Don't ask to ask, just ask | |
PerlMonks |
Re: change hour in timestampby 1nickt (Canon) |
on Jun 04, 2022 at 21:31 UTC ( [id://11144397]=note: print w/replies, xml ) | Need Help?? |
Hi, I suggest to use a parser to parse your string into a DateTime object. I also suggest to handle time zones properly and not just by subtracting a value from the hours. What will happen when you try that and the time is earlier than 02:00 ?
Hope this helps!
The way forward always starts with a minimal test.
In Section
Seekers of Perl Wisdom
|
|