#!/usr/local/bin/perl

unless (@ARGV && $ARGV[0] =~ /^[-+]\d+$/) {
	        print STDERR "Usage: $0 [-|+]DAYS\n";
			        exit 64;
}

$now = time;
$now_h = (localtime($now))[2];
$then = $now + $ARGV[0]*86400;
$then_h = (localtime($then))[2];
$t = localtime($then + 3600 * ($now_h-$then_h)%24);

print "$t\n";
