ID: 44257 Updated by: [EMAIL PROTECTED] Reported By: iuri dot fiedoruk at hp dot com -Status: Assigned +Status: Closed Bug Type: *General Issues Operating System: Windows XP PHP Version: 5.2.5 Assigned To: derick New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Thanks for the patch! Previous Comments: ------------------------------------------------------------------------ [2008-02-26 20:55:30] iuri dot fiedoruk at hp dot com Description: ------------ In ext/date/lib/timelib_struct.h you have: typedef struct _timelib_tz_lookup_table { char *name; int type; int gmtoffset; char *full_tz_name; } timelib_tz_lookup_table; But in ext/date/lib/fallbackmap.h you can notice some timezones are declared with offsets non-integer like: { "ist", 0, 5.5, "Asia/Calcutta" }, This break get_default_timezone function that reverts to UTC for those values that are non-integer. The fix is easy, just change gmtoffset to float: typedef struct _timelib_tz_lookup_table { char *name; int type; int gmtoffset; char *full_tz_name; } timelib_tz_lookup_table; I've tested under Visual Studio 2005 Express and with this change date_default_timezone_get() works fine now. If there is a place to send patches, please tell me and I'll gladly submit. Reproduce code: --------------- Run date_default_timezone_get() in a Windows machine with a non-integer timezone (for example calcutah +5:30) Expected result: ---------------- Shold return IST Actual result: -------------- Returns UTC ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44257&edit=1
