htmanning has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to tell if a transaction occurred more than 1 day ago. I have a $last_timeout value in the database saved as a timestamp by MySQL in this format:
Perl's DateTime's "now" feature is in this format:Tue Oct 23, 2018 - 19:57:12
2018-10-24T10:37:03
What is the best way to go about this? All I need to do is subtract one from the other to see if the value is >= 1.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Comparing different timestamp formats
by haukex (Archbishop) on Oct 24, 2018 at 20:55 UTC | |
|
Re: Comparing different timestamp formats
by tangent (Parson) on Oct 24, 2018 at 21:59 UTC | |
|
Re: Comparing different timestamp formats
by 1nickt (Canon) on Oct 24, 2018 at 21:14 UTC |