# Declare the local variables used by this subroutine my (@local, @gmt, @cs); # Compute the time zones @local = localtime(); @gmt = gmtime(); @cs = @gmt; $cs[2] = $cs[2] + 2; if ($cs[2] > 23) { $cs[2] = $cs[2] - 24; } # Display the results as an HTML table row WebPerl::Print ''; WebPerl::Print sprintf('%02d:%02d:%02d', $local[2], $local[1], $local[0]); WebPerl::Print sprintf('%02d:%02d:%02d', $gmt[2], $gmt[1], $gmt[0]); WebPerl::Print sprintf('%02d:%02d:%02d', $cs[2], $cs[1], $cs[0]); WebPerl::Print ''; # A return value of 0 means the subroutine succeeded 0;

Time Zones

Local GMT CompuSource