|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-10-13 07:34 UTC] pajoye@php.net
[2009-10-21 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 11:00:02 2026 UTC |
Description: ------------ DST in Brazil will only begin in October 18th, but PHP considered it has already started on October 11th. This is causing very significant problems in Brasilian web systems! DST in Brazil are weird, I mean, its rules changes every year. This year president Lula imposed it will begin every third October's sundays and will ends in the third February's sundays. Although now there is a general rule, there is still problems. For example: some Brazilian states just don't accept DST and they often win processes in justice to not follow DST. Other potential problem is there is 4 different time zones in Brazilian's huge territory (that is even bigger than continental USA), and "normally" only one has DST, who is "Brazil/East". To be honest, I can't see a simple solution for this bug, but what I'm sure is that a lot of people in Brazil will face a buggy week between October 11th and 18th! Reproduce code: --------------- Try to run <? $x = date("Y-m-d H:i:s"); exit($x); ?> in PHP an then compare to "SELECT localtime" in MySQL Expected result: ---------------- PHP result will show a date 1 hour ahead of MySQL's Actual result: -------------- PHP: 2009-10-13 01:27:37 MYSQL 2009-10-13 00:27:37