mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
Adjust date("") handling.
This commit is contained in:
parent
ee5fd96e37
commit
919b0bd5b4
@ -347,6 +347,10 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca
|
||||
timelib_time_offset *offset;
|
||||
timelib_sll isoweek, isoyear;
|
||||
|
||||
if (!format_len) {
|
||||
return estrdup("");
|
||||
}
|
||||
|
||||
if (localtime) {
|
||||
if (t->zone_type == TIMELIB_ZONETYPE_ABBR) {
|
||||
offset = timelib_time_offset_ctor();
|
||||
@ -369,7 +373,6 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca
|
||||
}
|
||||
}
|
||||
buffer[32] = '\0';
|
||||
smart_str_appends(&string, "");
|
||||
timelib_isoweek_from_date(t->y, t->m, t->d, &isoweek, &isoyear);
|
||||
|
||||
for (i = 0; i < format_len; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user