Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: bst time?

by Pizentios (Scribe)
on Aug 08, 2013 at 13:38 UTC ( #1048573=note: print w/ replies, xml ) Need Help??


in reply to bst time?

I second DateTime. However if you are reading date strings from a data file or db and bneed to convert them i have found that DateTime::Format::DateParse works really well for this

Do something like:

use strict; use warnings; use DateTime::Format::DateParse; my $dt = DateTime::Format::DateParse->parse_date($date_string, $zone);

The module will parse your date string and return a DateTime object (which you can then use the DateTime methods etc to do stuff with the date). You would then use $dt->set_time_zone() to change your time zone.

See DateTime::Format::DateParse and DateTime For more information about the modules.

-Pizentios


Comment on Re: bst time?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1048573]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (16)
As of 2015-07-01 16:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (11 votes), past polls