]> granicus.if.org Git - php/commitdiff
MFH Fix bug #48276 - year is a long long so we need %lld so big endian systems print...
authorScott MacVicar <scottmac@php.net>
Sun, 21 Jun 2009 22:19:19 +0000 (22:19 +0000)
committerScott MacVicar <scottmac@php.net>
Sun, 21 Jun 2009 22:19:19 +0000 (22:19 +0000)
ext/date/php_date.c

index d5aef811dcc4126a4b10bd8b2340706221454e2a..29a348fb70fe6a87cb9e37acb541747d5d814098 100644 (file)
@@ -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;