Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Difficult on use time

by exilepanda (Monk)
on Apr 07, 2012 at 17:05 UTC ( #963933=note: print w/ replies, xml ) Need Help??


in reply to Re: Difficult on use time
in thread Difficult on use time

That's right, if I all use gmtime or localtime, I can have a constant base, ( but believe this is not same as working a system in a GMT+0 TZ ). And for me, both has its drawback. If all gmtime, I might not reflecting to the real time to my local system; if I hard code the conversion, I lost the portability if the system moves to other time zone. And if all localtime, it sometimes surprised me like if I use Date_to_Time in Date::Calc (this returns me a gmt+0 seconds)...

DateTime is pretty good enough for conditions, however it complexity increased the interpret time and maintenance effort. Though I really use them them in some real difficult calculation. But for something just like :

doSomething() if ( time == $triggerSecond );
I really don't want to call a module

However, thank you for your reminder! I think I should consider to use DateTime for now, which could be a nice tools I've forgotten when I am dealing with this package.


Comment on Re^2: Difficult on use time
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2014-08-01 17:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (36 votes), past polls