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

Thread: date > O

  1. #1
    New Coder
    Join Date
    Dec 2003
    Location
    Miami, FL
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    date > O

    checking the date() function, i have found the O (Difference to Greenwich time (GMT) in hours) thing, but it dosn't explain how to use it.

    any help?
    MeGa MaX
    Be the Best, but don't Believe it.

  • #2
    New Coder
    Join Date
    Dec 2003
    Location
    Miami, FL
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    mmm... what i meant.

    can i use O to change the time zone by using date?
    thanks
    MeGa MaX
    Be the Best, but don't Believe it.

  • #3
    Regular Coder
    Join Date
    May 2002
    Location
    Virginia, USA
    Posts
    620
    Thanks
    0
    Thanked 6 Times in 6 Posts
    If you use the following on a server here in Virginia, USA (GMT -5):

    PHP Code:
    <?php
    echo date("O");
    ?>
    the output (to the screen) is this:

    -0500

    does that help?

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Sheffield, UK
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i find that

    gmdate('d/m/y g:ia',time()+($offset*3600));

    works for me, where offset it the number of hours from GMT.
    "To be successful in IT you don't need to know everything - just where to find it in under 30 seconds"

    (Me Me Me Me Me Me Me Me Me)

  • #5
    New Coder
    Join Date
    Dec 2003
    Location
    Miami, FL
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    oh thanks a lot ReadMe text file! (lol)
    MeGa MaX
    Be the Best, but don't Believe it.


  •  

    Posting Permissions

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