Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #54290
| From | random832@fastmail.us |
|---|---|
| References | <3C2755B3-2478-45E1-88F5-9FD961F2B1BD@gmail.com> <1379354161.1707.22675889.2647208B@webmail.messagingengine.com> <AFCFEAA4-5D61-4318-B737-AA7BDEDBAF80@gmail.com> |
| Subject | Re: Is %z broken for return values of time.gmtime()? |
| Date | 2013-09-17 08:48 -0400 |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.65.1379422087.18130.python-list@python.org> (permalink) |
On Mon, Sep 16, 2013, at 16:55, Michael Schwarz wrote: > On 2013-W38-1, at 19:56, random832@fastmail.us wrote: > > > On Mon, Sep 16, 2013, at 9:15, Michael Schwarz wrote: > >> According to the documentation of time.gmtime(), it returns a struct_time > >> in UTC, but %z is replaced by +0100, which is the UTC offset of my OS’s > >> time zone without DST, but DST is currently in effect here (but was not > >> at the timestamp passed to gmtime()). > > > > The struct_time type does not include information about what timezone it > > is in. > > Uhm … Python 3.3 introduced the tm_gmtoff member of struct_time, which > contains the offset to UTC. I don't see it. Maybe it is not available on platforms that do not provide it? Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit (AMD64)] on win32) I would argue that it _should_ be, and that it should populate it with 0 in gmtime or either with timezone/altzone or by some sort of reverse calculation in localtime, but it is not. Another problem to add to my list of reasons for my recent python-ideas proposal.
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Is %z broken for return values of time.gmtime()? random832@fastmail.us - 2013-09-17 08:48 -0400 Re: Is %z broken for return values of time.gmtime()? Anssi Saari <as@sci.fi> - 2013-09-18 15:01 +0300
csiph-web