CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Time zone

 



kepler
Novice

Aug 15, 2014, 12:42 AM

Post #1 of 2 (682 views)
Time zone Can't Post

Hi,

I want to make a script that calculates the UTC time from a Local time in a particular location. There's GMT offset to be considered and DST. I've found the Olson Database, which gives information since GMT and DST were applied along time. Is there a script that can do this along the different years - past, present and future - given a date and region?

Kind regards,

Kepler


Zhris
Enthusiast

Aug 15, 2014, 9:30 PM

Post #2 of 2 (666 views)
Re: [kepler] Time zone [In reply to] Can't Post

One option could be to use DateTime to create a datetime object with whatever date, time and timezone you want, then adjust the timezone as required. The complexity might be mapping regions to timezones i.e. United States lies within multiple timezones, although i'm sure there will be plenty of freely available data where this has already been done in the most appropriate manner. Unless of course your definition of region is simply timezone i.e. 'America/Chicago'.

Chris


(This post was edited by Zhris on Aug 15, 2014, 9:31 PM)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives