[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: Time Zone application after strptime?

M.-A. Lemburg

3/12/2008 7:51:00 PM

Jim Carroll wrote:
> M.-A. Lemburg <mal <at> egenix.com> writes:
>
>> On 2008-03-07 22:24, Jim Carroll wrote:
>>> It's taken me a couple of hours to give up on strptime
>>> with %Z for recognizing
>>> time zones... but that still leaves me in the wrong zone:
>>>
>>> How can I use the "PST" (or any other time zone name)
>>> to adjust dt by the
>>> correct number of hours to get it into UTC before storing in MySQL?
>> You could try mxDateTime's parser. It will convert most timezones
>> into UTC for you:
>>
>> >>> from mx.DateTime import *
>> >>> DateTimeFrom('10:29:52 PST, Feb 29, 2008')
>> <mx.DateTime.DateTime object for '2008-02-29 18:29:52.
>> 00' at 2afdc7078f50>
>>
>
> Unfortunately, mx.DateTime also ignores the time zone. If
> I parse the PST time, and ask for the result's time zone it
> gives me my local time zone.

The result of the mxDateTime parser will always be UTC, if you
provide a time zone. You can then convert this value to any other
timezone you choose.

The reason for this is simple: UTC is the only stable timezone
you can use if you want to store date/time value in e.g. a
database or file.

--
Marc-Andre Lemburg
eGenix.com

Professional Python Software directly from the Source (#1, Aug 10 2003)
>>> Python/Zope Products & Consulting ... http://www.e...
>>> mxODBC, mxDateTime, mxTextTools ... http://python.e...
________________________________________________________________________
1 Answer

DGDevin

11/20/2011 7:20:00 PM

0



"sweetbac" wrote in message news:ja99vg$74r$1@dont-email.me...


> Eh.....the outtakes are just OK...I never heard 'em before....
> maybe a bit more rocking than what ended up on the record.

I find that sort of thing fascinating as it shows how a band tried a song
from different angles before finally settling on the version they liked
most. It's also interesting to hear how a band like the Stones works up a
song, e.g. Jagger singing a sort of guide vocal before he's actually written
the lyrics just to figure out how he wants it to sound once he has the words
on paper.

> I would be far more interested in a "Tattoo You" deluxe treatment.
> ( that being the last great Stones rekkid )

I don't know if I'd class it as a great album although it certainly was
commercially successful. I assume you know the story, how TY was assembled
by Jagger out of leftovers from previous albums, Richards then emerging from
a drug-addled haze for the accompanying tour to discover "Mick Jagger and
the Rolling Stones" had a new hit album. If you watch the concert film from
that tour (Let's Spend the Night Together) it's clear that Richards isn't
speaking to Jagger, he'll barely even look at him). Those rock stars
certainly are highly-strung folks.