From: Scott MacVicar Date: Sun, 21 Jun 2009 22:19:19 +0000 (+0000) Subject: MFH Fix bug #48276 - year is a long long so we need %lld so big endian systems print... X-Git-Tag: php-5.2.11RC1~256 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=624930c22f87b7918d7ba3618a114880391ce7a5;p=php MFH Fix bug #48276 - year is a long long so we need %lld so big endian systems print the correct value. --- diff --git a/ext/date/php_date.c b/ext/date/php_date.c index d5aef811dc..29a348fb70 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -798,7 +798,7 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca /* year */ case 'L': length = slprintf(buffer, 32, "%d", timelib_is_leap((int) t->y)); break; case 'y': length = slprintf(buffer, 32, "%02d", (int) t->y % 100); break; - case 'Y': length = slprintf(buffer, 32, "%s%04ld", t->y < 0 ? "-" : "", llabs(t->y)); break; + case 'Y': length = slprintf(buffer, 32, "%s%04lld", t->y < 0 ? "-" : "", llabs(t->y)); break; /* time */ case 'a': length = slprintf(buffer, 32, "%s", t->h >= 12 ? "pm" : "am"); break;