Web Analytics Made Easy -
StatCounter Time Zones - CodingForum

Announcement

Collapse
No announcement yet.

Time Zones

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Time Zones

    I am currently using
    PHP Code:
    date("F dS, Y h:i:s A"); 
    for the date of everything around my site, but I'm from England and this doesn't represent english time, I was just wondering how do I make this represent English time?
    Matt Davenport - Freelance Web Developer

  • #2
    There's some GMT command type thing but I'm not sure what that is..

    So instead do this:

    date("F dS, Y h:i:s A",time()-3600);

    3600 is one hour.. So if you find the time is 6 hours ahead of the time you want do: 21600

    Comment


    • #3
      hey thanks for the reply

      I tried
      PHP Code:
      $today date("F dS, Y h:i:s A",time()+28800); 
      but it's made no difference

      Any ideas?
      Matt Davenport - Freelance Web Developer

      Comment


      • #4
        gmdate() gives the GMT date.
        I'm not sure if this was any help, but I hope it didn't make you stupider.

        Experience is something you get just after you really need it.
        PHP Installation Guide Feedback welcome.

        Comment


        • #5
          thanks guys!

          I eventually sorted it with
          PHP Code:
          putenv("TZ=Europe/London"); 
          Matt Davenport - Freelance Web Developer

          Comment

          Working...
          X