php date() one hour ahead of server time (DST problem)

前端 未结 1 1574
轮回少年
轮回少年 2021-01-13 22:38

I\'m trying to troubleshoot and solve this problem: the server I\'m working on (php 5.2.9 on Linux), has the correct local time (America/Buenos_Aires):

user         


        
1条回答
  •  既然无缘
    2021-01-13 23:13

    There was a question a few days back that suggested that PHP hasn't yet got wind of the fact that Argentina got rid of DST only this year. It seems like this decision hasn't made it into the code base yet. (But it was not confirmed, so it's not 100% clear whether this was it.)

    Maybe try dumping your time zones the same way to see whether that applies to your PHP version, too.

    Update: This indeed seems to be the problem. The best solution I can think of is to use an offset in the time zone, e.g. Etc/GMT-3

    Somebody should file a bug with bugs.php.net, there doesn't seem to be one for this.

    0 讨论(0)
提交回复
热议问题