Commit c0404e15 authored by Guido van Rossum's avatar Guido van Rossum

Move %x test to nonstandard section because it appears to be locale specific.

parent 3c884a50
...@@ -57,8 +57,7 @@ def strftest(now): ...@@ -57,8 +57,7 @@ def strftest(now):
('%w', '%d' % ((1+now[6]) % 7), 'weekday as a number (Sun 1st)'), ('%w', '%d' % ((1+now[6]) % 7), 'weekday as a number (Sun 1st)'),
('%W', '%02d' % ((now[7] + (jan1[6] - 1)%7)/7), ('%W', '%02d' % ((now[7] + (jan1[6] - 1)%7)/7),
'week number of the year (Mon 1st)'), 'week number of the year (Mon 1st)'),
('%x', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)), # %x see below
'%m/%d/%y %H:%M:%S'),
('%X', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'), ('%X', '%02d:%02d:%02d' % (now[3], now[4], now[5]), '%H:%M:%S'),
('%y', '%02d' % (now[0]%100), 'year without century'), ('%y', '%02d' % (now[0]%100), 'year without century'),
('%Y', '%d' % now[0], 'year with century'), ('%Y', '%d' % now[0], 'year with century'),
...@@ -69,6 +68,8 @@ def strftest(now): ...@@ -69,6 +68,8 @@ def strftest(now):
nonstandard_expectations = ( nonstandard_expectations = (
# These are standard but don't have predictable output # These are standard but don't have predictable output
('%c', fixasctime(time.asctime(now)), 'near-asctime() format'), ('%c', fixasctime(time.asctime(now)), 'near-asctime() format'),
('%x', '%02d/%02d/%02d' % (now[1], now[2], (now[0]%100)),
'%m/%d/%y %H:%M:%S'),
('(%Z)', '(%s)' % tz, 'time zone name'), ('(%Z)', '(%s)' % tz, 'time zone name'),
# These are some platform specific extensions # These are some platform specific extensions
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment