Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder Andy92's Avatar
    Join Date
    Nov 2005
    Location
    Horsham, West Sussex, UK
    Posts
    363
    Thanks
    7
    Thanked 1 Time in 1 Post

    gmdate add 1 hour?

    Hi there,

    I had the following php code...

    PHP Code:
    $posted gmdate("jS F Y \a\\t g:ia"); 
    But now, the clocks have been moved forward 1 hour, and it is displaying the time 1 hour behind?

    How can i fix this to make it 1 hour ahed?


  • #2
    Regular Coder
    Join Date
    Oct 2005
    Location
    Right Here
    Posts
    654
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hmm gmdate is what it is... If you have the incorrect time for your timezone, then you need to change that and not the gmdate as it seems you would put this through a function to get a users timezone? Im just speculating...

  • #3
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,172
    Thanks
    19
    Thanked 65 Times in 64 Posts
    contrary to common belief, GMT does not move backwards and forwards. We are now in a different, 'made up' time zone called 'British Summer Time' (or GMT+1) If your server is on BST date() will give you the correct time.

  • #4
    Regular Coder Andy92's Avatar
    Join Date
    Nov 2005
    Location
    Horsham, West Sussex, UK
    Posts
    363
    Thanks
    7
    Thanked 1 Time in 1 Post
    Ok,

    So how could i do that? I have seen the php date O and you can set it to be +0200 and that would mean 2 hours ahed of gmt, but i havent found any examples?


  • #5
    Regular Coder
    Join Date
    Oct 2005
    Location
    Right Here
    Posts
    654
    Thanks
    1
    Thanked 0 Times in 0 Posts

  • #6
    Regular Coder Andy92's Avatar
    Join Date
    Nov 2005
    Location
    Horsham, West Sussex, UK
    Posts
    363
    Thanks
    7
    Thanked 1 Time in 1 Post
    Ok,

    Thanks for all your help!

    Got it fixed now.

    Thank you!



  •  

    Posting Permissions

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