From 5345eec0b83492bdab79d2ba8646c0c22e16003c Mon Sep 17 00:00:00 2001 From: Scott MacVicar Date: Sun, 21 Jun 2009 22:18:53 +0000 Subject: [PATCH] Fix bug #48276 - year is a long long so we need %lld so big endian systems print the correct value. --- ext/date/php_date.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 0facfa0b17..df0cd571ad 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -1143,7 +1143,7 @@ static char *date_format(char *format, int format_len, int *return_len, timelib_ /* year */ case 'L': length = date_spprintf(&buffer, 32 TSRMLS_CC, "%d", timelib_is_leap((int) t->y)); break; case 'y': length = date_spprintf(&buffer, 32 TSRMLS_CC, "%02d", (int) t->y % 100); break; - case 'Y': length = date_spprintf(&buffer, 32 TSRMLS_CC, "%s%04ld", t->y < 0 ? "-" : "", llabs(t->y)); break; + case 'Y': length = date_spprintf(&buffer, 32 TSRMLS_CC, "%s%04lld", t->y < 0 ? "-" : "", llabs(t->y)); break; /* time */ case 'a': length = date_spprintf(&buffer, 32 TSRMLS_CC, "%R", localized ? IS_UNICODE : IS_STRING, am_pm_lower_full(t->h >= 12 ? 1 : 0, localized)); break; -- 2.50.1