[Tutor] incrementing one minute

pa yo payo2000 at gmail.com
Tue Mar 31 19:16:10 CEST 2009


Hi Dave,

Yep - incrementing seems to be working fine now.

Now I can access smaller XML files that should allow me to use DOM
rather than SAX - which I was struggling to understand.

Paul Y


On Tue, Mar 31, 2009 at 2:29 PM, Dave Angel <davea at ieee.org> wrote:
> Sorry for the bad assumption.  But the thread "Caught out by daylight saving
> :-(" on  the python-list was very similar, differing mainly by the fact he's
> incrementing by 5 minutes instead of 1.
>
> Did my suggested function replacements work for you?  They did here.
>
> po yo wrote:
>>
>> I am trying to filter Open Street Map nodes from
>>
>> http://planet.openstreetmap.org/minute/
>>
>> ... into wikimark up for Yellowikis (http://www.yellowikis.org)
>>
>>  I work from home - but this isn't a homework assignment. :-)
>>
>> Paul Y
>>
>> On Mon, Mar 30, 2009 at 5:52 PM, Dave Angel <davea at ieee.org> wrote:
>>
>>>
>>> This is the second post I've seen on this homework assignment. ?You might
>>> look at the Python List for other ideas.
>>>
>>> mktime() and gmtime() are not inverses of each other. ?The first assumes
>>> local time, and the latter gmt (or utc). ?So unless you happen to be in
>>> England, and not in daylight savings time, you'd expect a problem.
>>>
>>> mktime() is documented as the inverse of localtime(), according to the
>>> docs.
>>> ?I'd assume they'd both make the same time adjustments for your location.
>>> ?However, there's some ambiguity if the time you're looking at is in
>>> standard time, while you're currently in daylight savings. ?So I'd look
>>> for
>>> an answer that only used UTC (or Greenwich Mean time).
>>>
>>> Try time.gmtime(), and calendar.timegm()
>>>
>>>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>


More information about the Tutor mailing list