CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
Time Zone CGI Perl Question



Mar 20, 2000, 4:02 PM

Post #1 of 2 (1593 views)
Time Zone CGI Perl Question Can't Post

I am using the following Guestbook Script on one of my pages:

Version 2.3.1
Copyright 1996 Matt Wright Created 4/21/95
Last Modified 10/29/95
Scripts Archive at:

I was wondering if some one could take a look at the CGI Perl and help me understand
how to have the correct time zone displayed.
It currently displays CT and I would like it to display Eastern.

This is what I think needs changing:
# Get the Date for Entry
$date = `$date_command +"%A, %B %d, %Y at %T (%Z)"`; chop($date);
$shortdate = `$date_command +"%D %T %Z"`; chop($shortdate);

The (%Z) displays the "C" for Central

Any help would be great!

- Mark


Mar 20, 2000, 11:10 PM

Post #2 of 2 (1593 views)
Re: Time Zone CGI Perl Question [In reply to] Can't Post

If I am not mistaken this happens because your server is in CT time zone and has been setup to return that time zone when queried. You probably could do some math wit this and add or subtract for the correct zone.


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives