note 51171 added to function.gmstrftime
| From: | pvdster at hotmail dot com | Date: | Tue, 22 Mar 2005 15:50:13 +0000 |
| Subject: | note 51171 added to function.gmstrftime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-86797@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:
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 :)
----
Manual Page -- http://www.php.net/manual/en/function.gmstrftime.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+51171
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51171&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51171&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51171&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51171&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51171&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+51171&report=yes
Search -- http://master.php.net/manage/user-notes.php