in reply to How can i add 2 hours to localtime?

Localtime is based on epoch seconds. Meaning: localtime holds a big number of seconds that did past since a specific date (date depends on OS). Just add two hours (in seconds) to your localtime before you work with it.
#!/usr/local/bin/perl use warnings; use strict; my $secs_in_minute = 60; my $mins_in_hour = 60; my $two_hours = $secs_in_minute * $mins_in_hour * 2; my $xronos = localtime (time + $two_hours); print $xronos."\n";

/oliver/

Updated code snippet, so that it would compile