]> granicus.if.org Git - php/commitdiff
- Fixed bug #40012 (php_date.c doesnt compile on Netware).
authorDerick Rethans <derick@php.net>
Wed, 3 Jan 2007 14:46:23 +0000 (14:46 +0000)
committerDerick Rethans <derick@php.net>
Wed, 3 Jan 2007 14:46:23 +0000 (14:46 +0000)
NEWS
ext/date/php_date.c

diff --git a/NEWS b/NEWS
index f2e03da5a15809b8f79d1c97576de6d655c863d0..287c97239bd2e18ef9cf3d2b1628c09752d8b684 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,8 @@ PHP                                                                        NEWS
   __inet_pton() and inet_ntop() was named __inet_ntop(). (Hannes)
 - Fixed the validate email filter so that the letter "v" can also be used in
   the user part of the email address. (Derick)
+- Fixed bug #40012 (php_date.c doesnt compile on Netware). (gk at gknw dot de,
+  Derick)
 - Fixed bug #39984 (redirect response code in header() could be ignored in
   CGI sapi). (Ilia)
 - Fixed bug #39971 (pg_insert/pg_update do not allow now() to be used for
index 21f280f288a8416285fa9b9d7e33d51ca93da69c..d7b8fddae41785d0b1ce8d975c57bc9886e31fb6 100644 (file)
@@ -623,6 +623,14 @@ php_win_std_time:
                }
                return tzid;
        }
+#elif defined(NETWARE)
+       /* Try to guess timezone from system information */
+       {
+               char *tzid = timelib_timezone_id_from_abbr("", ((_timezone * -1) + (daylightOffset * daylightOnOff)), daylightOnOff);
+               if (tzid) {
+                       return tzid;
+               }
+       }
 #endif
        /* Fallback to UTC */
        php_error_docref(NULL TSRMLS_CC, E_WARNING, DATE_TZ_ERRMSG "We had to select 'UTC' because your platform doesn't provide functionality for the guessing algorithm");
@@ -2061,7 +2069,7 @@ PHP_FUNCTION(timezone_name_get)
 PHP_FUNCTION(timezone_name_from_abbr)
 {
        char    *abbr;
-       char    *tzname;
+       char    *tzid;
        int      abbr_len;
        long     gmtoffset = -1;
        long     isdst = -1;
@@ -2069,10 +2077,10 @@ PHP_FUNCTION(timezone_name_from_abbr)
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ll", &abbr, &abbr_len, &gmtoffset, &isdst) == FAILURE) {
                RETURN_FALSE;
        }
-       tzname = timelib_timezone_id_from_abbr(abbr, gmtoffset, isdst);
+       tzid = timelib_timezone_id_from_abbr(abbr, gmtoffset, isdst);
 
-       if (tzname) {
-               RETURN_STRING(tzname, 1);
+       if (tzid) {
+               RETURN_STRING(tzid, 1);
        } else {
                RETURN_FALSE;
        }