From: Steve Hay Date: Mon, 28 Nov 2005 17:07:25 +0000 (+0000) Subject: Fix ext/POSIX/t/time.t on Win32 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0be3c6f7a4944de19c9556f549685e4972fa6fdd;p=p5sagit%2Fp5-mst-13.2.git Fix ext/POSIX/t/time.t on Win32 According to MSDN, "The string result produced by ctime contains exactly 26 characters and has the form: Wed Jan 02 02:03:55 1980\n\0" so we *do* want the leading zero on the day returned by strftime p4raw-id: //depot/perl@26222 --- diff --git a/ext/POSIX/t/time.t b/ext/POSIX/t/time.t index 1d4e5f6..33bb556 100644 --- a/ext/POSIX/t/time.t +++ b/ext/POSIX/t/time.t @@ -37,7 +37,7 @@ 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)), + is(ctime(0), strftime("%a %b %d %H:%M:%S %Y\n", localtime(0)), "get ctime() equal to strftime()"); } else { is(ctime(0), strftime("%a %b %e %H:%M:%S %Y\n", localtime(0)),