Time conversion between UTC and local time

  • Thread starter andreas.profous
  • Start date
A

andreas.profous

Hi all,

I have the following problem:
There are strings describing a UTC time, e.g. " 2008-01-15 22:32:30"
and a string reflecting the time
zone e.g. "-05:00".

What is an elegant way of getting the local time (considering DST -
daylight saving time) with that data?
The date is not important, just the local time.
The format is not important, the easiest would probably be a tuple
(h,m,s) .

Thanks in advance
 
M

Miki

Hello,
I have the following problem:
There are strings describing a UTC time, e.g. " 2008-01-15 22:32:30"
and a string reflecting the time
zone e.g. "-05:00".

What is an elegant way of getting the local time (considering DST -
daylight saving time) with that data?
The date is not important, just the local time.
The format is not important, the easiest would probably be a tuple
(h,m,s) .

http://labix.org/python-dateutil

HTH,
 

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

Staff online

Members online

Forum statistics

Threads
473,961
Messages
2,570,130
Members
46,689
Latest member
liammiller

Latest Threads

Top