mirror of
https://github.com/php/php-src.git
synced 2025-08-18 23:18:56 +02:00
Fix bug #48276 - year is a long long so we need %lld so big endian systems print the correct value.
This commit is contained in:
parent
d19b44b95d
commit
5345eec0b8
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue