diff options
| author | Brett Cannon <brett@python.org> | 2012-06-15 23:04:29 (GMT) |
|---|---|---|
| committer | Brett Cannon <brett@python.org> | 2012-06-15 23:04:29 (GMT) |
| commit | 24aa693c7ef8f217fbd238eb7af7d828e13a07eb (patch) | |
| tree | 7d01ab630c2e8eef1e168b1aa5d84131b60cfd50 /Lib/_strptime.py | |
| parent | 99d776fdf4aa5a66266ebcec2263fab501f03088 (diff) | |
| parent | 016ef551a793f72f582d707ce5bb55bf4940cf27 (diff) | |
| download | cpython-24aa693c7ef8f217fbd238eb7af7d828e13a07eb.zip cpython-24aa693c7ef8f217fbd238eb7af7d828e13a07eb.tar.gz cpython-24aa693c7ef8f217fbd238eb7af7d828e13a07eb.tar.bz2 | |
Merge
Diffstat (limited to 'Lib/_strptime.py')
| -rw-r--r-- | Lib/_strptime.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/_strptime.py b/Lib/_strptime.py index fa06376..b0cd3d6 100644 --- a/Lib/_strptime.py +++ b/Lib/_strptime.py @@ -486,19 +486,19 @@ def _strptime(data_string, format="%a %b %d %H:%M:%S %Y"): return (year, month, day, hour, minute, second, - weekday, julian, tz, gmtoff, tzname), fraction + weekday, julian, tz, tzname, gmtoff), fraction def _strptime_time(data_string, format="%a %b %d %H:%M:%S %Y"): """Return a time struct based on the input string and the format string.""" tt = _strptime(data_string, format)[0] - return time.struct_time(tt[:9]) + return time.struct_time(tt[:time._STRUCT_TM_ITEMS]) def _strptime_datetime(cls, data_string, format="%a %b %d %H:%M:%S %Y"): """Return a class cls instance based on the input string and the format string.""" tt, fraction = _strptime(data_string, format) - gmtoff, tzname = tt[-2:] + tzname, gmtoff = tt[-2:] args = tt[:6] + (fraction,) if gmtoff is not None: tzdelta = datetime_timedelta(seconds=gmtoff) |
