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

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
Time zone



Aug 15, 2014, 12:42 AM

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


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,



Aug 15, 2014, 9:30 PM

Post #2 of 2 (750 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'.


(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