2

Have you ever had any issue with PHP timezones conversions through the getTransitions function?

I am trying to convert an Argentinian date into GMT. If I look into the array of transitions, I get:

....
[63] => Array ( [ts] => 1287284400 [time] => 2010-10-17T03:00:00+0000 [offset] => -7200 [isdst] => 1 [abbr] => ARST )
[64] => Array ( [ts] => 1300586400 [time] => 2011-03-20T02:00:00+0000 [offset] => -10800 [isdst] => [abbr] => ART )
...

what means, If I am not wrong, from 2010-10-17 until 2011-03-20 the difference in seconds of the Argentinian date, compared with the GMT equivalent, it will be -7.200 (2 hours).

But reality is the current offset is four hours.

Please, what I am missing? Sorry if looks like homework but I have searched and tried a lot of things before writing the question.

Thanks.

Edit: Thank you for the responses. I understand PHP transitions are hardcoded in PHP dll.s installations, so if any country government decide to change their time policies then getTransitions became obsolete unless you upgrade your PHP installation (something not so easy when you have a production environment or are using a shared hosting).

So new question, there exists any webservices or dynamic API to know the current time delay (or future delay) for a specific timezone, like http://worldtimeengine.com/api/ but perhaps free?

Pacob
  • 21
  • 4
  • 2
    Interesting. Timeanddate.com claims that Argentina [has not had a DST switch this year](http://timeanddate.com/worldclock/timezone.html?n=51&syear=2010), but had one last year. This would conflict with the dump you show above. Which is correct? – Pekka Oct 27 '10 at 20:30
  • there also seems to be some provinces that do DST and some that refuse to judging by this [debian bug report](http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502430) though it's from 2008 and I have no clue what the current status is. – Gordon Nov 01 '10 at 20:47

1 Answers1

1

I'm not sure that's incorrect?

http://en.wikipedia.org/wiki/Time_in_Argentina

States that generally Argentina is on UTC -3, and that they sometimes observe summer time. Which would make it UTC -2?

On the other hand, the article states that they don't currently observe summer time, so that would keep them at UTC-3 (-10800)? It's possible that the time database you have is old?

McKay
  • 12,334
  • 7
  • 53
  • 76