Re: About date & time...
| From: | Grant Young | Date: | Tue, 28 Feb 2006 22:25:39 +0000 |
| Subject: | Re: About date & time... | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-231236@lists.php.net to get a copy of this message | ||
Hi Gustav.
I'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