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:
Karl Williamson 2025-11-14 06:54:48 -07:00 committed by Steve Hay
parent b62ff81707
commit 95a6ebda40

View File

@ -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;
}