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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top