Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Difficult on use time

by Marshall (Abbot)
on Apr 08, 2012 at 04:48 UTC ( #963968=note: print w/replies, xml ) Need Help??

in reply to Difficult on use time

My advice is to log everything in GMT (UTC) and use GMT for all of your calculations. Standardize upon that. Use one of the Date/Time modules to convert to local time for presentation.

if I hard code the conversion, I lost the portability if the system moves to other time zone.
store all the data as UTC, convert when necessary for user presentation.

Replies are listed 'Best First'.
Re^2: Difficult on use time
by exilepanda (Pilgrim) on Apr 08, 2012 at 17:31 UTC
    Thanks for the advise! For my development scope, I don't see the necessity to maintain 2 time manner. I could change my system timezone for this situation as last resort. As I do not need the timezone auto convert in this way. However, I am looking if there's any Perl way can do this.

    For more real case, I do not hesitate to do the conversation, but rather reserve the timezone for public users' own tz for their own location( not my system ). Writing log or so is just one example, out of many scenarios.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://963968]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2017-11-19 16:10 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (282 votes). Check out past polls.