+ Reply to Thread
Results 1 to 1 of 1

Thread: Timezone

  1. #1
    mattura's Avatar
    mattura is offline x10 Elder mattura is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    563

    Timezone

    Hi
    I want to have a different timezone in my php Date function (with daylight saving time)
    I have seen many solutions on the web which say:

    putenv("TZ=US/Eastern");

    This function has, however been disabled (maybe it is enabled in the level 3 php, but I'd feel silly asking for php level 3 just for that...
    Is there a soft-code way to do it (bearing in mind daylight savings time, I can't just add/subtract hours)?

    Thanks in advance

    Edit:
    Never mind, I found the answer:

    Just put this in your php:

    date_default_timezone_set('GMT');

    or 'GB' for Great Britain's timezone
    or whatever country's timezone you want (it adjusts for DST)
    Last edited by mattura; 10-21-2007 at 04:14 AM. Reason: Automerged Doublepost

+ Reply to Thread

Similar Threads

  1. setting website time to gmt?
    By hyeclass in forum Scripts & 3rd Party Apps
    Replies: 6
    Last Post: 01-11-2006, 04:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers