Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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]
erix could you an extra bit of cloud too
[erix]: heh I wrote 'you' instead of 'use' - dumb sound-typing
[GotToBTru]: i prefer clear skies to the cloud

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2017-07-27 14:53 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (416 votes). Check out past polls.