RON_ron Posted November 24, 2010 Share Posted November 24, 2010 How to set the time zone? All 3 shows the same time??? <?php date_default_timezone_set("Australia/Melbourne"); echo "time=" . time(); ?> <?php echo "time=" . time(); ?> <?php date_default_timezone_set("Antarctica/Palmer"); echo "time=" . time(); ?> Link to comment https://forums.phpfreaks.com/topic/219658-set-time-zone/ Share on other sites More sharing options...
Pikachu2000 Posted November 24, 2010 Share Posted November 24, 2010 time() always returns GMT. Link to comment https://forums.phpfreaks.com/topic/219658-set-time-zone/#findComment-1138856 Share on other sites More sharing options...
RON_ron Posted November 24, 2010 Author Share Posted November 24, 2010 Thanks Pikachu2000. Could you tell me a solution to echo time in a nominated timezone in SECONDS? Link to comment https://forums.phpfreaks.com/topic/219658-set-time-zone/#findComment-1138857 Share on other sites More sharing options...
RON_ron Posted November 24, 2010 Author Share Posted November 24, 2010 Help please... Link to comment https://forums.phpfreaks.com/topic/219658-set-time-zone/#findComment-1138868 Share on other sites More sharing options...
MrXHellboy Posted November 24, 2010 Share Posted November 24, 2010 Help with what exactly ? date_default_timezone_set("Antarctica/Palmer"); Sets the timezone and all thedate/time function are depending on this in a script. Link to comment https://forums.phpfreaks.com/topic/219658-set-time-zone/#findComment-1138869 Share on other sites More sharing options...
RON_ron Posted November 24, 2010 Author Share Posted November 24, 2010 Hi MrXHellboy... I want to echo the time() of "Antarctica/Palmer" As in my very first post, I'm unable to echo the time of the specified timezone - it always echo the GMT. Is there a way to echo the time() of a particular timezone? Link to comment https://forums.phpfreaks.com/topic/219658-set-time-zone/#findComment-1138870 Share on other sites More sharing options...
RON_ron Posted November 24, 2010 Author Share Posted November 24, 2010 Any suggestions? Link to comment https://forums.phpfreaks.com/topic/219658-set-time-zone/#findComment-1138878 Share on other sites More sharing options...
requinix Posted November 24, 2010 Share Posted November 24, 2010 Any suggestions? I have one. Look in the other thread. You know, the one you felt like creating because God knows why. Was this one not enough for you? Link to comment https://forums.phpfreaks.com/topic/219658-set-time-zone/#findComment-1138882 Share on other sites More sharing options...
MrXHellboy Posted November 24, 2010 Share Posted November 24, 2010 date_default_timezone_set("Europe/Amsterdam"); print_r(getdate()); It returns a nice array with your requests Link to comment https://forums.phpfreaks.com/topic/219658-set-time-zone/#findComment-1138883 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.