www.webdeveloper.com
Results 1 to 2 of 2

Thread: Managing timezones for different users

  1. #1
    Join Date
    Sep 2006
    Posts
    642

    Question Managing timezones for different users

    Hi

    I have a website where I have many users coming from different countries. Users can schedule a task based on their timezone. Now there is a cron running on the server after every min, the cron executes a script which checks if there are any scheduled task of any user and if so it does the needful.

    Since my server is based in the US, the script executed by the cron considers the timezone of the US. What do I have to do in my script that will execute the user's task based on user's timezone instead of server's timezone?

    Thanks in advance for any ideas

  2. #2
    Join Date
    Jun 2006
    Location
    Under your bed
    Posts
    357
    To convert between timezones I use PHP's DateTimeZone class and DateTime class.

    This might help: http://stackoverflow.com/questions/5...mezones-in-php

    And here's the timezones that I know you can use: http://php.net/manual/en/timezones.php
    The better I get at programming, the more I appreciate arrays. Handy dandy things they are.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles