jacko_162 Posted March 16, 2010 Share Posted March 16, 2010 As above, im looking into how i can go about having each user select there prefered timezone upon registration, and perhaps storing it in a session. then the time shown throughout my site shows there selected time zone and displays there own times. how easy is it to impliment and what would be involved? im assuming i have a "timezone" field in the members table and another table showing ID, timezone, and value then when i call the timezone i can select the "value" from the session variable? or am i over complicating things? Link to comment https://forums.phpfreaks.com/topic/195460-handling-user-time-zones/ Share on other sites More sharing options...
nafetski Posted March 16, 2010 Share Posted March 16, 2010 Timezones are actually a fairly difficult thing to handle...not overcomplicating it at all, and definitely not a bad question. There are a few ways to do it, I'll get back with you on what I think would be the most elegant. You could definitely store a property in the database (or session) and then use strtotime(). Take a peek at that, and I'll see what functions php has that natively take care of this. Been a while since I've messed with this Link to comment https://forums.phpfreaks.com/topic/195460-handling-user-time-zones/#findComment-1027082 Share on other sites More sharing options...
jacko_162 Posted March 16, 2010 Author Share Posted March 16, 2010 Timezones are actually a fairly difficult thing to handle...not overcomplicating it at all, and definitely not a bad question. There are a few ways to do it, I'll get back with you on what I think would be the most elegant. You could definitely store a property in the database (or session) and then use strtotime(). Take a peek at that, and I'll see what functions php has that natively take care of this. Been a while since I've messed with this thank you for an informative reply. i will look into strtotime() a little more now. Link to comment https://forums.phpfreaks.com/topic/195460-handling-user-time-zones/#findComment-1027093 Share on other sites More sharing options...
jacko_162 Posted March 16, 2010 Author Share Posted March 16, 2010 nafetski, any news on what i can do please? Link to comment https://forums.phpfreaks.com/topic/195460-handling-user-time-zones/#findComment-1027361 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.