Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #76362

Re: timedelta problem

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Denis McMahon <denismfmcmahon@gmail.com>
Newsgroups comp.lang.python
Subject Re: timedelta problem
Date Fri, 15 Aug 2014 08:44:04 +0000 (UTC)
Organization A noiseless patient Spider
Lines 16
Message-ID <lskh8k$8u4$1@dont-email.me> (permalink)
References <mailman.13018.1408069502.18130.python-list@python.org> <lskdfb$6bg$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
Injection-Date Fri, 15 Aug 2014 08:44:04 +0000 (UTC)
Injection-Info mx05.eternal-september.org; posting-host="66ffcfa4470a58bcddbdcd1913f98ab4"; logging-data="9156"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/SZ98ctA+C49I67JI1tNCTw+1ioD+50gI="
User-Agent Pan/0.136 (I'm far too busy being delicious; GIT 926a150 git://git.gnome.org/pan2)
Cancel-Lock sha1:ECtY0iqAl49RtXBnZaQkuWuTdj8=
Xref csiph.com comp.lang.python:76362

Show key headers only | View raw


On Fri, 15 Aug 2014 07:39:23 +0000, Denis McMahon wrote:

> I've patched my 2.7 to set a tz string of "UTC[+-]nnnn" from the
> [+-]nnnn %z value.

... but that doesn't do much, because time.struct_time in 2.7 doesn't 
recognise anything that strptime passes in as a tz at all, as it expects 
the dst flag in that position and seems to have no concept of tz at all.

So in 2.7 you can probably forget any question of reading in tz info with 
datetime.strptime().

See another reply to the OP regarding Python 3.2

-- 
Denis McMahon, denismfmcmahon@gmail.com

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

timedelta  problem luofeiyu <elearn2014@gmail.com> - 2014-08-15 10:24 +0800
  Re: timedelta  problem Denis McMahon <denismfmcmahon@gmail.com> - 2014-08-15 03:51 +0000
    Re: timedelta problem Chris Angelico <rosuav@gmail.com> - 2014-08-15 13:59 +1000
    Re: timedelta problem Ian Kelly <ian.g.kelly@gmail.com> - 2014-08-14 22:00 -0600
  Re: timedelta  problem Denis McMahon <denismfmcmahon@gmail.com> - 2014-08-15 07:39 +0000
    Re: timedelta  problem Denis McMahon <denismfmcmahon@gmail.com> - 2014-08-15 08:44 +0000
    Re: timedelta problem Ian Kelly <ian.g.kelly@gmail.com> - 2014-08-15 09:23 -0600
      Re: timedelta problem Denis McMahon <denismfmcmahon@gmail.com> - 2014-08-15 17:43 +0000
        Re: timedelta problem Ian Kelly <ian.g.kelly@gmail.com> - 2014-08-15 12:05 -0600
    Re: timedelta problem Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-15 17:29 +0100
  Re: timedelta  problem Denis McMahon <denismfmcmahon@gmail.com> - 2014-08-15 09:36 +0000

csiph-web