[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-25 Thread Derick Rethans
derick   Tue, 25 Jan 2011 15:08:19 +

Revision: http://svn.php.net/viewvc?view=revision&revision=307735

Log:
- Let's keep this consistent in the whole file.

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/date/php_date.c
U   php/php-src/trunk/ext/date/php_date.c

Modified: php/php-src/branches/PHP_5_3/ext/date/php_date.c
===
--- php/php-src/branches/PHP_5_3/ext/date/php_date.c2011-01-25 14:59:24 UTC 
(rev 307734)
+++ php/php-src/branches/PHP_5_3/ext/date/php_date.c2011-01-25 15:08:19 UTC 
(rev 307735)
@@ -897,7 +897,7 @@
}

tzid = timelib_timezone_id_from_abbr("", 
(tzi.Bias + tzi.DaylightBias) * -60, 1);
-   if (tzid == NULL) {
+   if (! tzid) {
tzid = "UTC";
}
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
DATE_TZ_ERRMSG "We selected '%s' for '%.1f/DST' instead", tzid, ((tzi.Bias + 
tzi.DaylightBias) / -60.0));

Modified: php/php-src/trunk/ext/date/php_date.c
===
--- php/php-src/trunk/ext/date/php_date.c   2011-01-25 14:59:24 UTC (rev 
307734)
+++ php/php-src/trunk/ext/date/php_date.c   2011-01-25 15:08:19 UTC (rev 
307735)
@@ -897,7 +897,7 @@
}

tzid = timelib_timezone_id_from_abbr("", 
(tzi.Bias + tzi.DaylightBias) * -60, 1);
-   if (tzid == NULL) {
+   if (! tzid) {
tzid = "UTC";
}
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
DATE_TZ_ERRMSG "We selected '%s' for '%.1f/DST' instead", tzid, ((tzi.Bias + 
tzi.DaylightBias) / -60.0));

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-24 Thread Ilia Alshanetsky
iliaaMon, 24 Jan 2011 20:58:09 +

Revision: http://svn.php.net/viewvc?view=revision&revision=307719

Log:
removed un-used variable

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/date/php_date.c
U   php/php-src/trunk/ext/date/php_date.c

Modified: php/php-src/branches/PHP_5_3/ext/date/php_date.c
===
--- php/php-src/branches/PHP_5_3/ext/date/php_date.c2011-01-24 19:17:45 UTC 
(rev 307718)
+++ php/php-src/branches/PHP_5_3/ext/date/php_date.c2011-01-24 20:58:09 UTC 
(rev 307719)
@@ -3527,7 +3527,6 @@
 {
php_interval_obj *obj;
zval tmp_member, tmp_value;
-   int found = 0;

if (member->type != IS_STRING) {
tmp_member = *member;

Modified: php/php-src/trunk/ext/date/php_date.c
===
--- php/php-src/trunk/ext/date/php_date.c   2011-01-24 19:17:45 UTC (rev 
307718)
+++ php/php-src/trunk/ext/date/php_date.c   2011-01-24 20:58:09 UTC (rev 
307719)
@@ -3522,7 +3522,6 @@
 {
php_interval_obj *obj;
zval tmp_member, tmp_value;
-   int found = 0;

if (member->type != IS_STRING) {
tmp_member = *member;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/php_date.c trunk/ext/date/php_date.c

2011-01-19 Thread Pierre Joye
pajoye   Thu, 20 Jan 2011 07:05:34 +

Revision: http://svn.php.net/viewvc?view=revision&revision=307618

Log:
- be sure that we got tzid by adding a default case

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/date/php_date.c
U   php/php-src/trunk/ext/date/php_date.c

Modified: php/php-src/branches/PHP_5_3/ext/date/php_date.c
===
--- php/php-src/branches/PHP_5_3/ext/date/php_date.c2011-01-20 06:58:04 UTC 
(rev 307617)
+++ php/php-src/branches/PHP_5_3/ext/date/php_date.c2011-01-20 07:05:34 UTC 
(rev 307618)
@@ -889,17 +889,6 @@

switch (GetTimeZoneInformation(&tzi))
{
-   /* no DST or not in effect */
-   case TIME_ZONE_ID_UNKNOWN:
-   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_WARNING, 
DATE_TZ_ERRMSG "We selected '%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 */
@@ -908,11 +897,24 @@
}

tzid = timelib_timezone_id_from_abbr("", 
(tzi.Bias + tzi.DaylightBias) * -60, 1);
-   if (! tzid) {
+   if (tzid == NULL) {
tzid = "UTC";
}
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
DATE_TZ_ERRMSG "We selected '%s' for '%.1f/DST' instead", tzid, ((tzi.Bias + 
tzi.DaylightBias) / -60.0));
break;
+
+   /* no DST or not in effect */
+   case TIME_ZONE_ID_UNKNOWN:
+   case TIME_ZONE_ID_STANDARD:
+   default:
+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_WARNING, 
DATE_TZ_ERRMSG "We selected '%s' for '%.1f/no DST' instead", tzid, ((tzi.Bias + 
tzi.StandardBias) / -60.0));
+   break;
+
}
return tzid;
}

Modified: php/php-src/trunk/ext/date/php_date.c
===
--- php/php-src/trunk/ext/date/php_date.c   2011-01-20 06:58:04 UTC (rev 
307617)
+++ php/php-src/trunk/ext/date/php_date.c   2011-01-20 07:05:34 UTC (rev 
307618)
@@ -889,17 +889,6 @@

switch (GetTimeZoneInformation(&tzi))
{
-   /* no DST or not in effect */
-   case TIME_ZONE_ID_UNKNOWN:
-   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_WARNING, 
DATE_TZ_ERRMSG "We selected '%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 */
@@ -908,11 +897,24 @@
}

tzid = timelib_timezone_id_from_abbr("", 
(tzi.Bias + tzi.DaylightBias) * -60, 1);
-   if (! tzid) {
+   if (tzid == NULL) {
tzid = "UTC";
}
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
DATE_TZ_ERRMSG "We selected '%s' for '%.1f/DST' instead", tzid, ((tzi.Bias + 
tzi.DaylightBias) / -60.0));
break;
+
+   /* no DST or not in effect */
+   case TIME_ZONE_ID_UNKNOWN:
+   case TIME_ZONE_ID_STANDARD:
+   default:
+php_win_std_time:
+   tzid = timelib_timezone