mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 16:39:36 +00:00
my_strftime(): Properly take daylight savings into account
Because of the bug fixed in the previous commit, this function was changed in 5.42 to have a work around, which is no longer needed. (cherry picked from commit c85683700affe3e6b2d93a127c2a40092bacc513)
This commit is contained in:
parent
b62ff81707
commit
95a6ebda40
3
locale.c
3
locale.c
@ -8231,7 +8231,6 @@ Perl_my_strftime(pTHX_ const char *fmt, int sec, int min, int hour,
|
||||
PERL_ARGS_ASSERT_MY_STRFTIME;
|
||||
PERL_UNUSED_ARG(wday);
|
||||
PERL_UNUSED_ARG(yday);
|
||||
PERL_UNUSED_ARG(isdst);
|
||||
|
||||
#ifdef USE_LOCALE_TIME
|
||||
const char * locale = querylocale_c(LC_TIME);
|
||||
@ -8240,7 +8239,7 @@ Perl_my_strftime(pTHX_ const char *fmt, int sec, int min, int hour,
|
||||
#endif
|
||||
|
||||
struct tm mytm;
|
||||
ints_to_tm(&mytm, locale, sec, min, hour, mday, mon, year, 0);
|
||||
ints_to_tm(&mytm, locale, sec, min, hour, mday, mon, year, isdst);
|
||||
if (! strftime_tm(fmt, PL_scratch_langinfo, locale, &mytm)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user