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(); ?> Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted November 24, 2010 Share Posted November 24, 2010 time() always returns GMT. Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
RON_ron Posted November 24, 2010 Author Share Posted November 24, 2010 Help please... Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
RON_ron Posted November 24, 2010 Author Share Posted November 24, 2010 Any suggestions? Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment 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.