Skip to content

RFC822 timestamp using GMT is parsed into BST if local time is UK time #318

@JordonPhillips

Description

@JordonPhillips

The following code snipped prints True unless the machine is using UK time.

from datetime import datetime
from dateutil.parser import parse
from dateutil.tz import tzutc


d1 = datetime(2002, 10, 2, 13, 0, tzinfo=tzutc())
d2 = parse('Wed, 02 Oct 2002 13:00:00 GMT')
print(d1 == d2)

It appears that at this point in the parse function, the parser sees that local time is one of ('GMT', 'BST') because in the Summer the UK uses BST (GMT+1).

Source issue: boto/botocore#1070

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions