SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Apr 2007
    Posts
    685
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Converting Times depending on user timezone

    I'm trying to create a code that will allow two users to setup a meetup time.

    I have one table:

    Code:
    id - time - meridiem
    
    Some sample data:
    
    1 - 12:00 - A.M
    2 - 12:30 - A.M
    I also have a users table

    Code:
    id - user - timezone
    
    some sample data:
    
    1 - user1 - America/Denver
    2 - user2 - America/El_Salvador

    If user1 selects 12:00 A.M as the time, I want to convert it to show the correct time in the registered timezone for the second user whenever he views the time that was selected.

    Anyone give me any ideas? Thanks so much.

  2. #2
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,055
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    You will want to use the DateTime object
    Be sure to congratulate Patche on earning July's Member of the Month
    Go ahead and blame me, I still won't lose any sleep over it
    My Blog | My Technical Notes


Bookmarks

Posting Permissions

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