Bug #45081 [Com]: strtotime incorrectly interprets SGT time zone
Edit report at https://bugs.php.net/bug.php?id=45081&edit=1 ID: 45081 Comment by: sdf at fake-email-address dot com Reported by:george dot wright at infimatic dot com Summary:strtotime incorrectly interprets SGT time zone Status: Assigned Type: Bug Package:Date/time related Operating System: SUSE 10.2 PHP Version:5.2.6 Assigned To:derick Block user comment: N Private report: N New Comment: Any update on this? I'm using PHP 5.3.3-7+squeeze15 with timezonedb 2013.3 and SGT is still off by 30 minutes. Previous Comments: [2008-05-23 17:43:24] george dot wright at infimatic dot com Correct, my copy/paste mistake. Ant ETA on a fix? [2008-05-23 16:42:04] der...@php.net There is an issue here, but the expected result is: 1211472000 1211472000 [2008-05-23 15:39:51] 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: --- "; print strtotime('2008-05-23 00:00:00'); ?> Expected result: 1211473800 1211473800 Actual result: -- 1211473800 1211472000 -- Edit this bug report at https://bugs.php.net/bug.php?id=45081&edit=1
Bug #45081 [Com]: strtotime incorrectly interprets SGT time zone
Edit report at https://bugs.php.net/bug.php?id=45081&edit=1 ID: 45081 Comment by: sdf at fake-email-address dot com Reported by:george dot wright at infimatic dot com Summary:strtotime incorrectly interprets SGT time zone Status: Assigned Type: Bug Package:Date/time related Operating System: SUSE 10.2 PHP Version:5.2.6 Assigned To:derick Block user comment: N Private report: N New Comment: Unfortunately not. The offsets are hard coded into PHP, timezonedb is not used for strtotime. Previous Comments: [2013-05-30 08:38:54] php at synotna dot org Probable workaround? http://pecl.php.net/package/timezonedb [2013-05-30 00:43:57] sdf at fake-email-address dot com Any update on this? I'm using PHP 5.3.3-7+squeeze15 with timezonedb 2013.3 and SGT is still off by 30 minutes. [2008-05-23 17:43:24] george dot wright at infimatic dot com Correct, my copy/paste mistake. Ant ETA on a fix? [2008-05-23 16:42:04] der...@php.net There is an issue here, but the expected result is: 1211472000 1211472000 [2008-05-23 15:39:51] 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: --- "; print strtotime('2008-05-23 00:00:00'); ?> Expected result: 1211473800 1211473800 Actual result: -- 1211473800 1211472000 -- Edit this bug report at https://bugs.php.net/bug.php?id=45081&edit=1
Bug #45081 [Com]: strtotime incorrectly interprets SGT time zone
Edit report at https://bugs.php.net/bug.php?id=45081&edit=1 ID: 45081 Comment by: sdf at fake-email-address dot com Reported by:george dot wright at infimatic dot com Summary:strtotime incorrectly interprets SGT time zone Status: Assigned Type: Bug Package:Date/time related Operating System: SUSE 10.2 PHP Version:5.2.6 Assigned To:derick Block user comment: N Private report: N New Comment: 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. Previous Comments: [2013-05-31 13:46:45] der...@php.net Timezonedb is used for strtotime. ------------ [2013-05-30 23:44:24] sdf at fake-email-address dot com Unfortunately not. The offsets are hard coded into PHP, timezonedb is not used for strtotime. [2013-05-30 08:38:54] php at synotna dot org Probable workaround? http://pecl.php.net/package/timezonedb ------------ [2013-05-30 00:43:57] sdf at fake-email-address dot com Any update on this? I'm using PHP 5.3.3-7+squeeze15 with timezonedb 2013.3 and SGT is still off by 30 minutes. [2008-05-23 17:43:24] george dot wright at infimatic dot com Correct, my copy/paste mistake. Ant ETA on a fix? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=45081 -- Edit this bug report at https://bugs.php.net/bug.php?id=45081&edit=1
Bug #45081 [Com]: strtotime incorrectly interprets SGT time zone
Edit report at https://bugs.php.net/bug.php?id=45081&edit=1 ID: 45081 Comment by: sdf at fake-email-address dot com Reported by:george dot wright at infimatic dot com Summary:strtotime incorrectly interprets SGT time zone Status: Assigned Type: Bug Package:Date/time related Operating System: SUSE 10.2 PHP Version:5.2.6 Assigned To:derick Block user comment: N Private report: N New Comment: I don't see any evidence of this file being autogenerated. It's included in the source distribution. Maybe it's autogenerated at some point by someone, but the timezonedb.h that gets included in the build is essentially hard-coded and doesn't use the system timezonedb at any point. If it is autogenerated, maybe it's time for someone to rebuild it and update the distribution. Previous Comments: [2013-06-12 19:56:53] ahar...@php.net That file is autogenerated from timezonedb, I believe. -------- [2013-06-10 06:57:38] sdf at fake-email-address dot com 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. [2013-05-31 13:46:45] der...@php.net Timezonedb is used for strtotime. [2013-05-30 23:44:24] sdf at fake-email-address dot com Unfortunately not. The offsets are hard coded into PHP, timezonedb is not used for strtotime. [2013-05-30 08:38:54] php at synotna dot org Probable workaround? http://pecl.php.net/package/timezonedb The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=45081 -- Edit this bug report at https://bugs.php.net/bug.php?id=45081&edit=1