Skip to content

test_parse_date #218

Closed
Closed
@yarikoptic

Description

@yarikoptic

as originally discussed in #216 and now moved outside

I am a bit uncertain if the test rests on correct assumptions:

 99             rfc = ("Thu, 07 Apr 2005 22:13:11 +0000", 0)
100             iso = ("2005-04-07T22:13:11 -0200", 7200)
101             iso2 = ("2005-04-07 22:13:11 +0400", -14400)
102             iso3 = ("2005.04.07 22:13:11 -0000", 0)
103             alt = ("04/07/2005 22:13:11", 0)
104             alt2 = ("07.04.2005 22:13:11", 0)
105             veri_time = 1112904791      # the time this represents
(Pdb) 
106             for date, offset in (rfc, iso, iso2, iso3, alt, alt2):
107  ->             assert_rval(parse_date(date), veri_time, offset)

while date says it was 20 not 22 hours at UTC

$> date -u --date='@1112904791' 
Thu Apr  7 20:13:11 UTC 2005

changing to 1112911991 (prev + 2 hours) doesn't resolve the problem though

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions