5kyy8lu3 Posted January 28, 2009 Share Posted January 28, 2009 Hi. I know you can set time zone but for the clients, I can't think of any good ways to have it set a timezone. Will I have to make a drop down box of time zones and make a script that adjusts server time to their time zone? I'm stumped so any help is appreciated, thanks. I could just have the user enter the time on their own but I like auto-filling as much stuff as possible to make things more 'user friendly.' Thanks ahead of time. Link to comment https://forums.phpfreaks.com/topic/142751-time-zone/ Share on other sites More sharing options...
gevans Posted January 28, 2009 Share Posted January 28, 2009 If you know your server runs off GMT for exampple your drop down can be built as follows; ......and more (GMT-4) - 6:41 (GMT-3) - 7:41 (GMT-2) - 8:41 (GMT-1) - 9:41 (GMT) - 10:41 (GMT+1) - 11:41 (GMT+2) - 12:41 (GMT+3) - 13:41 (GMT+4) - 14:41 .......and more Then at the start of every script set a timestamp; $thetime = time(); Adjust for user $userTimeDifference = get this from a db table (example); $theTime += $userTimeDifference; Link to comment https://forums.phpfreaks.com/topic/142751-time-zone/#findComment-748318 Share on other sites More sharing options...
revraz Posted January 28, 2009 Share Posted January 28, 2009 What I do is just let them set an Offset value (like -3). I personally didn't see the need to supply a pulldown for every timezone when they can just enter a number. Link to comment https://forums.phpfreaks.com/topic/142751-time-zone/#findComment-748462 Share on other sites More sharing options...
gevans Posted January 28, 2009 Share Posted January 28, 2009 I just do it for convenience. Means they can see their actual time (not that adding or subtracting whole numbers it that hard) Link to comment https://forums.phpfreaks.com/topic/142751-time-zone/#findComment-748467 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.