iliaa           Wed Sep 18 17:34:32 2002 EDT

  Modified files:              
    /php4/ext/standard  datetime.c 
  Log:
  Fixed bug #19446
  
  
Index: php4/ext/standard/datetime.c
diff -u php4/ext/standard/datetime.c:1.92 php4/ext/standard/datetime.c:1.93
--- php4/ext/standard/datetime.c:1.92   Thu Sep  5 08:09:57 2002
+++ php4/ext/standard/datetime.c        Wed Sep 18 17:34:30 2002
@@ -19,7 +19,7 @@
  */
 
 
-/* $Id: datetime.c,v 1.92 2002/09/05 12:09:57 hyanantha Exp $ */
+/* $Id: datetime.c,v 1.93 2002/09/18 21:34:30 iliaa Exp $ */
 
 
 #include "php.h"
@@ -494,9 +494,9 @@
                                break;
                        case 'O':               /* GMT offset in [+-]HHMM format */
 #if HAVE_TM_GMTOFF                             
-                               sprintf(tmp_buff, "%c%02d%02d", (ta->tm_gmtoff < 0) ? 
'-' : '+', abs(ta->tm_gmtoff / 3600), abs( ta->tm_gmtoff % 3600));
+                               sprintf(tmp_buff, "%c%02d%02d", (ta->tm_gmtoff < 0) ? 
+'-' : '+', abs(ta->tm_gmtoff / 3600), abs( (ta->tm_gmtoff % 3600) / 60 ));
 #else
-                               sprintf(tmp_buff, "%c%02d%02d", ((ta->tm_isdst ? tzone 
- 3600:tzone)>0)?'-':'+', abs((ta->tm_isdst ? tzone - 3600 : tzone) / 3600), 
abs((ta->tm_isdst ? tzone - 3600 : tzone) % 3600));
+                               sprintf(tmp_buff, "%c%02d%02d", ((ta->tm_isdst ? tzone 
+- 3600:tzone)>0)?'-':'+', abs((ta->tm_isdst ? tzone - 3600 : tzone) / 3600), 
+abs(((ta->tm_isdst ? tzone - 3600 : tzone) % 3600) / 60));
 #endif
                                strcat(Z_STRVAL_P(return_value), tmp_buff);
                                break;
@@ -545,7 +545,7 @@
                                        ta->tm_sec,
                                        (ta->tm_gmtoff < 0) ? '-' : '+',
                                        abs(ta->tm_gmtoff / 3600),
-                                       abs( ta->tm_gmtoff % 3600)
+                                       abs( (ta->tm_gmtoff % 3600) / 60 )
                                );
 #else
                                sprintf(tmp_buff, "%3s, %2d %3s %04d %02d:%02d:%02d 
%c%02d%02d", 
@@ -558,7 +558,7 @@
                                        ta->tm_sec,
                                        ((ta->tm_isdst ? tzone - 3600 : tzone) > 0) ? 
'-' : '+',
                                        abs((ta->tm_isdst ? tzone - 3600 : tzone) / 
3600),
-                                       abs((ta->tm_isdst ? tzone - 3600 : tzone) % 
3600)
+                                       abs( ((ta->tm_isdst ? tzone - 3600 : tzone) % 
+3600) / 60 )
                                );
 #endif
                                strcat(Z_STRVAL_P(return_value), tmp_buff);



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

Reply via email to