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 3 of 3

Thread: Php time

  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

    Php time

    Hi there,

    I have a comments system, and basically when people post a comment, it shows the time they post the comment.

    This is what i have...

    PHP Code:
    $posted date("jS F Y \a\\t g:ia"); 
    It is working, but its saying the time on the server in america, which is 6 hours behind gtm time.

    What do i need to edit in my code to make it so that it adds another 6 hours to what the time is, so it makes the time gtm?


  • #2
    New Coder
    Join Date
    Nov 2006
    Location
    UK
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This should do the trick: gmdate
    - Mark

  • #3
    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, i changed date to gmdate and it works.

    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
    •