time.strptime

M

Michele Simionato

I have strings representing UTC dates and I want to convert them in time tuples
using time.strptime. I have an issue with daylight savings.
For instance

Tue Sep 14 06:06:15 2004

is converted to

(2004, 9, 14, 6, 6, 15, 1, 258, -1)

The last "-1" means daylight savings. I want it to be 0.
I tried to play with time.daylight and time.timezone but with no luck.
Any hints?
TIA,

Michele Simionato
 
A

Alex Martelli

Michele Simionato said:
I have strings representing UTC dates and I want to convert them in time
tuples using time.strptime. I have an issue with daylight savings. For
instance

Tue Sep 14 06:06:15 2004

is converted to

(2004, 9, 14, 6, 6, 15, 1, 258, -1)

The last "-1" means daylight savings. I want it to be 0.
I tried to play with time.daylight and time.timezone but with no luck.
(2004, 9, 14, 6, 6, 15, 1, 258, 0)


Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,233
Latest member
AlyssaCrai

Latest Threads

Top