diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2002-09-18 21:34:30 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2002-09-18 21:34:30 +0000 |
commit | 0dddad02faaf6e20f139d347da4c2f1fbd9a9f70 (patch) | |
tree | b279974dfb2c210d5682a265299f8c36b343b826 | |
parent | 869c42a511f5a89d7afaf5e0ef5b66128da9170f (diff) | |
download | php-git-0dddad02faaf6e20f139d347da4c2f1fbd9a9f70.tar.gz |
Fixed bug #19446
-rw-r--r-- | ext/standard/datetime.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c index ac88e743d0..53b0622649 100644 --- a/ext/standard/datetime.c +++ b/ext/standard/datetime.c @@ -494,9 +494,9 @@ php_date(INTERNAL_FUNCTION_PARAMETERS, int gm) 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 @@ php_date(INTERNAL_FUNCTION_PARAMETERS, int gm) 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 @@ php_date(INTERNAL_FUNCTION_PARAMETERS, int gm) 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); |