note 51171 modified in function.gmstrftime by danbrown

From: Date: Sun, 20 Jul 2008 03:20:57 +0000
Subject: note 51171 modified in function.gmstrftime by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-142054@lists.php.net to get a copy of this message
If you want the dutch time on your pages and you are hosted on a server in the USA you can easily change it this way: <?php setlocale(LC_TIME, 'nl_NL'); $tgl = gmstrftime("%d %B %Y - %H:%M uur",time()+3600); ?> Then use $tgl to display the right time. Note the +3600 is a day light savings time correction. The result: 22 maart 2005 - 16:39 uur First I used the normal date function and this was the previous result: March 22, 2005 - 04:28 AM I needed it for a dutch guestbook. I'm new to PHP and it took me a while to find it out and maybe it's of no use for experienced PHP programmers but I thought people can always ignore my post :) --was-- If you want the dutch time on your pages and you are hosted on a server in the USA you can easily change it this way: setlocale(LC_TIME, 'nl_NL'); $tgl= gmstrftime("%d %B %Y - %H:%M uur",time()+3600); Then use $tgl to display the right time. Note the +3600 is a day light savings time correction. The result: 22 maart 2005 - 16:39 uur First I used the normal date function and this was the previous result: March 22, 2005 - 04:28 AM I needed it for a dutch guestbook. I'm new to PHP and it took me a while to find it out and maybe it's of no use for experienced PHP programmers but I thought people can always ignore my post :) http://php.net/manual/en/function.gmstrftime.php

« previous php.notes (#142054) next »