This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author wiml
Recipients wiml
Date 2010-07-14.01:34:01
SpamBayes Score 4.730966e-05
Marked as misclassified No
Message-id <1279071244.17.0.181964010836.issue9256@psf.upfronthosting.co.za>
In-reply-to
Content
The plistlib module parses <date> elements in the plist into datetime objects. (This is good.) However, it produces naïve datetimes, even though the <date> elements include an explicit timezone specification ('Z' for UTC, since they're in ISO 8601 format).

Now that issue 5094 has been fixed, this should be a pretty trivial thing to fix— just pass tzinfo=UTC when creating the datetime (since the regex it uses won't even accept a date that doesn't have the 'Z' suffix, this will be correct).

As an aside: RFC 3339 section 4.3 suggests a convention for distinguishing between "timestamps in UTC" and "timestamps which happen to be defined in terms of UTC, but don't really live in any particular timezone". The python datetime module is not currently able to make this distinction AFAIK, but even though the plist date strings don't follow the RFC 3339 convention, they are most accurately described as having an unknown local offset (like POSIX timestamps, they are UTC-referenced but cannot carry local-timezone info).
History
Date User Action Args
2010-07-14 01:34:05wimlsetrecipients: + wiml
2010-07-14 01:34:04wimlsetmessageid: <1279071244.17.0.181964010836.issue9256@psf.upfronthosting.co.za>
2010-07-14 01:34:01wimllinkissue9256 messages
2010-07-14 01:34:01wimlcreate