www.webdeveloper.com
Results 1 to 3 of 3

Thread: localtime/date

  1. #1
    Join Date
    May 2004
    Location
    dobson ave.
    Posts
    694

    localtime/date

    Hi -
    Been using a great guestbook.cgi script for a while now...only thing I haven't figured out how to 'tweak' is this:

    Time/date posted with the messages reflects, of course, the server's time - which is an hour ahead of my time zone.
    Any way I can change it to subtract one hour?

    $time = localtime($time);

    Thanks in advance,
    El

  2. #2
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    Code:
    $time = localtime($time - 3600);
    However, there is still a potential problem later on. That is if you ever moved to another server in another time zone then all your dates would once again be incorrect.

    Perl also has a gmtime() function, which will return the same time no matter what zone you are in.
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

  3. #3
    Join Date
    May 2004
    Location
    dobson ave.
    Posts
    694

    Time

    Hi -
    Thanks so much for your reply - will change the code and see how it works. Since this is my 'free' space from my ISP, it'll be used for quite awhile!

    Much appreciation,
    El

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles