#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Norcross, GA
    Posts
    458
    Rep Power
    14
    When I use:

    $localtimezone = date("T");
    print $localtimezone;

    What prints to the screen is the zone where my host computer is located(PDT). Is there a way I can alter this so that my local time zone(EDT) is returned?

    Thanks for all your help - I've been learning quite a bit the last few weeks.

    - Mike
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Washington, USA
    Posts
    52
    Rep Power
    14
    I've successfully used JavaScript to get local time and then compared against the server time with php to get a base time offset. There probably is a better way, but I know that this works and can be used for any timezone.


    ------------------
    <UL TYPE=SQUARE>
    <LI> TD Scripts
    <LI> Script School
    <LI>php-scripts
    </UL>
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Norcross, GA
    Posts
    458
    Rep Power
    14
    How would I compare two dates? when I use a TIMESTAMP variable, can I perfrom operations on it?

    Like this (pseudocode):

    $servertime is a TIMESTAMP

    $localtime = $servertime - 2 hours

    If I can do operations on the TIMESTAMP, I'm in business.

Similar Threads

  1. Uploading Files
    By vivekjain in forum ASP Programming
    Replies: 0
    Last Post: February 16th, 2004, 11:21 PM
  2. Pascal date function
    By Gavin83 in forum Delphi Programming
    Replies: 1
    Last Post: February 11th, 2004, 03:46 PM
  3. time in - time out
    By newbiex in forum PHP Development
    Replies: 2
    Last Post: February 9th, 2004, 02:04 AM
  4. mysql date time stamp and UTF8
    By doomish in forum MySQL Help
    Replies: 0
    Last Post: February 8th, 2004, 08:37 AM
  5. Modifying a dreamweaver javascript function
    By hammerslane in forum JavaScript Development
    Replies: 3
    Last Post: January 28th, 2004, 10:00 AM

IMN logo majestic logo threadwatch logo seochat tools logo