Re: [Datetime-SIG] Allow numerical arguments for timezones
Dec. 11, 2015
1:35 a.m.
On Thu, Dec 10, 2015 at 8:26 PM, Guido van Rossum <guido@python.org> wrote:
My guess is that the OP is parsing dates that have a numerical TZ offset (like most date formats found in internet protocols like http or email headers).
If datetime.strptime() does not satisfy OP needs already, I am +1 for improving it. We have an open issue for that already: < http://bugs.python.org/issue24954>.
But there's really no substitute for just calling
datetime(....., tzinfo=timezone(timedelta(hours=......)))
This is ugly, but hopefully you won't see this outside of timezone support library functions.
3739
Age (days ago)
3739
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexander Belopolsky