Re: Possible bug with strftime ?
| From: | Hsieh Wen-Yang | Date: | Wed, 03 Jan 2001 21:15:22 +0000 |
| Subject: | Re: Possible bug with strftime ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32549@lists.php.net to get a copy of this message | ||
It will return 61 seconds since 1970/01/01 00:00:00 => 1970/01/01 00:01:01
(GMT)
I suppose your locale time is 1 hour before GMT, therefore, you got
1970/01/01 01:01:01 (your local timezone)
----- Original Message -----
From: "David Diaz i Torrico" <ddiaz@drac.com>
To: <php-general@lists.php.net>
Sent: Wednesday, January 03, 2001 7:29 AM
Subject: [PHP] Possible bug with strftime ?
Someone could tell me why this code returns: 01d01h01m01s, instead the
expected 00d00h01m01s
$row_values[average]=61;
printf("
<TR>
<TD>
Average:
</TD>
<TD>
%s
</TD>
</TR>
",strftime("%dd%Hh%Mm%Ss",$row_values[average]));
As far as I know the specs say that, why they doesn't work properly?:
* %d - day of the month as a decimal number (range 00 to 31)
* %H - hour as a decimal number using a 24-hour clock (range 00 to 23)
I'm using Server: Apache/1.3.14 (Unix) PHP/4.0.1 it's a bug or a feature?
--- Sistemes - DRAC telem輆ic ---------------------
c/ Transversal 226 - 08225 Terrassa
Tel: +34 93 736 48 30
mailto:david@drac.com
----------------------------------------------------
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net