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.