Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Difficult on use time

by exilepanda (Pilgrim)
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.

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 surveying the Monastery: (4)
As of 2016-06-25 04:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (323 votes). Check out past polls.