Re: About date & time...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:

>> H | 24-hour format of an hour with leading zeros | 00 through 23

With this in mind, the following will work (if I understand your question correctly):

$t = date('H\:\ i\:\ s');

HTH, Grant

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux