cvs: php-src(PHP_5_1) / NEWS /ext/date php_date.c /ext/date/lib fallbackmap.h
| From: | Derick Rethans | Date: | Sat, 15 Oct 2005 18:12:31 +0000 |
| Subject: | cvs: php-src(PHP_5_1) / NEWS /ext/date php_date.c /ext/date/lib fallbackmap.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-34607@lists.php.net to get a copy of this message | ||
derick Sat Oct 15 14:12:31 2005 EDT
Modified files: (Branch: PHP_5_1)
/php-src NEWS
/php-src/ext/date php_date.c
/php-src/ext/date/lib fallbackmap.h
Log:
- Fixed timezone guessing on Windows. (Derick, Nuno)
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.129&r2=1.2027.2.130&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.129 php-src/NEWS:1.2027.2.130
--- php-src/NEWS:1.2027.2.129 Sat Oct 15 02:32:21 2005
+++ php-src/NEWS Sat Oct 15 14:12:27 2005
@@ -1,6 +1,8 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Oct 2005, PHP 5.1 Release Candidate 3
+- Updated timezone database to version 2005.14. (Derick)
+- Fixed timezone guessing on Windows. (Derick, Nuno)
14 Oct 2005, PHP 5.1 Release Candidate 2
- Changed SQLite extension to be a shared module in Windows distribution.
http://cvs.php.net/diff.php/php-src/ext/date/php_date.c?r1=1.43.2.16&r2=1.43.2.17&ty=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.16 php-src/ext/date/php_date.c:1.43.2.17
--- php-src/ext/date/php_date.c:1.43.2.16 Wed Oct 12 15:49:59 2005
+++ php-src/ext/date/php_date.c Sat Oct 15 14:12:29 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_date.c,v 1.43.2.16 2005/10/12 19:49:59 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.17 2005/10/15 18:12:29 derick Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -337,26 +337,29 @@
switch (GetTimeZoneInformation(&tzi))
{
+ /* no DST or not in effect */
case TIME_ZONE_ID_UNKNOWN:
- /* we have no clue what it is, return UTC */
- php_error_docref(NULL TSRMLS_CC, E_STRICT, "It is not safe to rely on the systems timezone
settings, please use the date.timezone setting, the TZ environment variable or the
date_default_timezone_set() function. We use 'UTC' instead.");
- tzid = "UTC";
- break;
-
case TIME_ZONE_ID_STANDARD:
+php_win_std_time:
tzid = timelib_timezone_id_from_abbr("", (tzi.Bias + tzi.StandardBias) * -60, 0);
if (! tzid) {
tzid = "UTC";
}
- php_error_docref(NULL TSRMLS_CC, E_STRICT, "It is not safe to rely on the systems timezone
settings, please use the date.timezone setting, the TZ environment variable or the
date_default_timezone_set() function. We use '%s' for '%.1f/no DST'
instead.", tzid, (float) ((tzi.Bias + tzi.StandardBias) / -60));
+ php_error_docref(NULL TSRMLS_CC, E_STRICT, "It is not safe to rely on the systems timezone
settings, please use the date.timezone setting, the TZ environment variable or the
date_default_timezone_set() function. We use '%s' for '%.1f/no DST'
instead.", tzid, ((tzi.Bias + tzi.StandardBias) / -60.0));
break;
+ /* DST in effect */
case TIME_ZONE_ID_DAYLIGHT:
+ /* If user has disabled DST in the control panel, Windows returns 0 here */
+ if (tzi.DaylightBias == 0) {
+ goto php_win_std_time;
+ }
+
tzid = timelib_timezone_id_from_abbr("", (tzi.Bias + tzi.DaylightBias) * -60, 1);
if (! tzid) {
tzid = "UTC";
}
- php_error_docref(NULL TSRMLS_CC, E_STRICT, "It is not safe to rely on the systems timezone
settings, please use the date.timezone setting, the TZ environment variable or the
date_default_timezone_set() function. We use '%s' for '%.1f/DST' instead.",
tzid, (float) ((tzi.Bias + tzi.DaylightBias) / -60));
+ php_error_docref(NULL TSRMLS_CC, E_STRICT, "It is not safe to rely on the systems timezone
settings, please use the date.timezone setting, the TZ environment variable or the
date_default_timezone_set() function. We use '%s' for '%.1f/DST' instead.",
tzid, ((tzi.Bias + tzi.DaylightBias) / -60.0));
break;
}
return tzid;
http://cvs.php.net/diff.php/php-src/ext/date/lib/fallbackmap.h?r1=1.1.2.1&r2=1.1.2.2&ty=u
Index: php-src/ext/date/lib/fallbackmap.h
diff -u php-src/ext/date/lib/fallbackmap.h:1.1.2.1 php-src/ext/date/lib/fallbackmap.h:1.1.2.2
--- php-src/ext/date/lib/fallbackmap.h:1.1.2.1 Sat Oct 1 11:04:03 2005
+++ php-src/ext/date/lib/fallbackmap.h Sat Oct 15 14:12:29 2005
@@ -1,3 +1,4 @@
+ { "sst", 0, -11, "Pacific/Apia" },
{ "hst", 0, -10, "Pacific/Honolulu" },
{ "akst", 0, -9, "America/Anchorage" },
{ "akdt", 1, -8, "America/Anchorage" },
@@ -10,7 +11,11 @@
{ "est", 0, -5, "America/New_York" },
{ "edt", 1, -4, "America/New_York" },
{ "ast", 0, -4, "America/Halifax" },
- { "adt", 0, -3, "America/Halifax" },
+ { "adt", 1, -3, "America/Halifax" },
+ { "brt", 0, -3, "America/Sao_Paulo" },
+ { "brst", 1, -2, "America/Sao_Paulo" },
+ { "azost", 0, -1, "Atlantic/Azores" },
+ { "azodt", 1, 0, "Atlantic/Azores" },
{ "gmt", 0, 0, "Europe/London" },
{ "bst", 1, 1, "Europe/London" },
{ "cet", 0, 1, "Europe/Paris" },
@@ -23,6 +28,7 @@
{ "pkt", 0, 5, "Asia/Karachi" },
{ "ist", 0, 5.5, "Asia/Calcutta" },
{ "npt", 0, 5.75, "Asia/Katmandu" },
+ { "yekt", 1, 6, "Asia/Yekaterinburg" },
{ "novst", 1, 7, "Asia/Novosibirsk" },
{ "krat", 0, 7, "Asia/Krasnoyarsk" },
{ "krast", 1, 8, "Asia/Krasnoyarsk" },