dsaba Posted June 4, 2007 Share Posted June 4, 2007 I am trying to output different dates/times for different timezones with the date() function i realize you can put a specific timestamp to output the date the question is how do I input different timestamps for different timezones?? for example I can input time(); but that is only one timezone, the default one of the php.ini file how do I make timestamps from different timezones?? I'm using php 4 so I can't specify specific timezones to use the date function the other way that it describes when defining specific timezones thank you Quote Link to comment https://forums.phpfreaks.com/topic/54142-making-dates-for-different-timezones/ Share on other sites More sharing options...
chigley Posted June 4, 2007 Share Posted June 4, 2007 putenv("TZ=Europe/London"); PHP4 compatible. Quote Link to comment https://forums.phpfreaks.com/topic/54142-making-dates-for-different-timezones/#findComment-267682 Share on other sites More sharing options...
dsaba Posted June 4, 2007 Author Share Posted June 4, 2007 ok thanks i'm looking at the list of timezones available in the php.net manual http://www.php.net/manual/en/timezones.php#timezones.africa however I want to emulate how at SMF forums they let you choose a default timezone when you register, via a dropdown bar is there a way to grab all timezones available and put them in an array instead of manually writing each down and putting it into an array, as there are thousands of timezones or options available in the timezone list how does smf do it? Quote Link to comment https://forums.phpfreaks.com/topic/54142-making-dates-for-different-timezones/#findComment-267698 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.