Re: About date & time...
| From: | Gustav Wiberg | Date: | Tue, 28 Feb 2006 22:56:38 +0000 |
| Subject: | Re: About date & time... | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-231238@lists.php.net to get a copy of this message | ||
----- Original Message ----- From: "Grant Young" <gyoung@wwf.org.au>
To: <php-general@lists.php.net>
Cc: <gustav@varupiraten.se>
Sent: Tuesday, February 28, 2006 11:25 PM
Subject: Re: [PHP] About date & time...
Hi Gustav.AHA!!! Sometimes I'm so stupid... hm... Thanx! :-) /GI'm a swede, and I we use hours 0 - 24. 8 pm = 20 for us. 9 pm = 21 for us 10 pm = 22... and so on... But with date()-function there is 10 pm that shows (and I want 22 to show instead) I'm using PHP 4.0.3... Do I have to use getdate() then? (getdate()-function showed 22...)The docs for date() (http://www.php.net/date) show that there are a number of different options for the first parameter. If you check out the table on that page, you'll find:With this in mind, the following will work (if I understand your question correctly): $t = date('H\:\ i\:\ s'); HTH, GrantH | 24-hour format of an hour with leading zeros | 00 through 23