|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-10-24 19:07 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 21:00:02 2026 UTC |
Description: ------------ The time zone used to generate formatted time from a timestamp changes depending on the timestamp itself, unless if the timezone is set to GMT. Reproduce code: --------------- date_default_timezone_set("Europe/Brussels"); $time=1162072800; print(strftime("%c %z", $time))."\n"; $time+=86400; print(strftime("%c %z", $time))."\n"; Expected result: ---------------- The two lines should reflect a time with 24 hours difference. Both lines should display the time as defined by the selected timezone (Which in the example code is 'Europe/Brussels', which is +0100). Actual result: -------------- The two lines reflect a time with 24 hours difference, but they are formatted in different time zones. The first is obviously not in the correct timezone ('Europe/Brussels'), even though the timezone was set correctly. Sun Oct 29 00:00:00 2006 +0200 Sun Oct 29 23:00:00 2006 +0100