# Untested print 'enter gmt time offset: '; $offset = <>; # sample input would be '-6' or '3', etc ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime(time() +$offset * 3600); $offsettime = ''. gmtime(time() +$offset * 3600);