Skip to content

Commit 5b9ceba

Browse files
committed
POSIX.xs: Properly take daylight savings into account
Because of the bug fixed two commits ago, this function was changed in 5.42 to have a work around, which is no longer needed.
1 parent 4596b80 commit 5b9ceba

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

ext/POSIX/POSIX.xs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3589,7 +3589,7 @@ difftime(time1, time2)
35893589
# sv_setpv(TARG, ...) could be used rather than
35903590
# ST(0) = sv_2mortal(newSVpv(...))
35913591
void
3592-
strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = 0)
3592+
strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1)
35933593
SV * fmt
35943594
int sec
35953595
int min
@@ -3605,10 +3605,8 @@ strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = 0)
36053605
PERL_UNUSED_ARG(wday);
36063606
PERL_UNUSED_ARG(yday);
36073607

3608-
/* -isdst triggers backwards compatibility mode for non-zero
3609-
* 'isdst' */
36103608
SV *sv = sv_strftime_ints(fmt, sec, min, hour, mday, mon, year,
3611-
-abs(isdst));
3609+
isdst);
36123610
if (sv) {
36133611
sv = sv_2mortal(sv);
36143612
}

ext/POSIX/lib/POSIX.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use warnings;
44

55
our ($AUTOLOAD, %SIGRT);
66

7-
our $VERSION = '2.24';
7+
our $VERSION = '2.25';
88

99
require XSLoader;
1010

0 commit comments

Comments
 (0)