|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-05-23 15:39 UTC] george dot wright at infimatic dot com
Description:
------------
Our server is set up for Asia/Singapore time
OS date command prints: Fri May 23 22:29:19 SGT 2008
Running the following code should produce the same result since the default timezone is SGT but it doesn't. Updating the timezonedb.so file to version 2008.2 (the newest available version) did not fix the problem.
Reproduce code:
---------------
<?php
print strtotime('2008-05-23 00:00:00 SGT');
print "<br>";
print strtotime('2008-05-23 00:00:00');
?>
Expected result:
----------------
1211473800
1211473800
Actual result:
--------------
1211473800
1211472000
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 13:00:02 2025 UTC |
If only it were.. ext/date/lib/parse_date.c: /* The timezone table. */ const static timelib_tz_lookup_table timelib_timezone_lookup[] = { #include "timezonemap.h" { NULL, 0, 0, NULL }, }; ext/date/lib/timezonemap.h: { "acst", 1, -14400, "America/Porto_Acre" }, { "acst", 1, -14400, "America/Eirunepe" }, { "acst", 1, -14400, "America/Rio_Branco" }, { "acst", 1, -14400, "Brazil/Acre" }, { "act", 0, -18000, "America/Porto_Acre" }, etc. All hard coded.