home *** CD-ROM | disk | FTP | other *** search
- MAIN:
- {
- # 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;
- }
-
- # Output the CGI headers
-
- print
- 'Content-type: text/html
-
- ';
-
- # Display the results as an HTML table
-
- print
- '<html><body background=/icons/textures/paper.jpg>
- <table border=1>
- <tr><th colspan=3><h2>Time Zones</h2></th></tr>
- <tr>
- <td><b>Local</b></td>
- <td><b>GMT</b></td>
- <td><b>CompuSource</b></td>
- </tr>
- <tr>';
-
- print sprintf('<td>%02d:%02d:%02d</td>', $local[2], $local[1], $local[0]);
- print sprintf('<td>%02d:%02d:%02d</td>', $gmt[2], $gmt[1], $gmt[0]);
- print sprintf('<td>%02d:%02d:%02d</td>', $cs[2], $cs[1], $cs[0]);
-
- print '</tr></table></body></html>';
-
- }
-
-