Re: [Datetime-SIG] Allow numerical arguments for timezones
11 Dec
2015
11 Dec
'15
1:35 a.m.
On Thu, Dec 10, 2015 at 8:26 PM, Guido van Rossum
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.
3057
Age (days ago)
3057
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexander Belopolsky