summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2005-12-17 04:03:05 +0000
committerSteve Peters <steve@fisharerojo.org>2005-12-17 04:03:05 +0000
commit018eeb1214fceb5fc2491b2c0cf4420b79b385ad (patch)
tree697e7bdc37f5b8e9171d5da10909b6299e9b9846 /ext
parent170c5524f26ec8d57d5b2a5413842df92809a613 (diff)
downloadperl-018eeb1214fceb5fc2491b2c0cf4420b79b385ad.tar.gz
Fix for ext/POSIX/t/time.t so the strftime() test works on systems
that aren't quite up to SUS3. Based on a patch by David Dyck in RT #37960: POSIX/t/time fails bleadperl p4raw-id: //depot/perl@26384
Diffstat (limited to 'ext')
-rw-r--r--ext/POSIX/t/time.t8
1 files changed, 2 insertions, 6 deletions
diff --git a/ext/POSIX/t/time.t b/ext/POSIX/t/time.t
index 33bb556449..c09a37540a 100644
--- a/ext/POSIX/t/time.t
+++ b/ext/POSIX/t/time.t
@@ -36,13 +36,9 @@ is(asctime(localtime(12345678)), ctime(12345678), "asctime() and ctime() at 1234
# Careful! strftime() is locale sensative. Let's take care of that
my $orig_loc = setlocale(LC_TIME, "C") || die "Cannot setlocale() to C: $!";
-if ($^O eq "MSWin32") {
- is(ctime(0), strftime("%a %b %d %H:%M:%S %Y\n", localtime(0)),
+my $jan_16 = 15 * 86400;
+is(ctime($jan_16), strftime("%a %b %d %H:%M:%S %Y\n", localtime($jan_16)),
"get ctime() equal to strftime()");
-} else {
- is(ctime(0), strftime("%a %b %e %H:%M:%S %Y\n", localtime(0)),
- "get ctime() equal to strftime()");
-}
setlocale(LC_TIME, $orig_loc) || die "Cannot setlocale() back to orig: $!";
# clock() seems to have different definitions of what it does between POSIX