There are things like Date::Calc, but I think the easiest way is: my $now_plus_two_h = localtime( time + 2*60*60); time gives unix epoch time in seconds, so we add two hours worth of seconds and apply localtime. If the date format doesn't suit you, call POSIX::strftime() on the localtime result. See man strftime to browse what format strings you can use.
After Compline,
Zaxo
In reply to Re: How can i add 2 hours to localtime?
by Zaxo
in thread How can i add 2 hours to localtime?
by Nik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |