#26236 [Opn->Csd]: one timestamp/two times

From: Date: Fri, 14 Nov 2003 09:04:53 +0000
Subject: #26236 [Opn->Csd]: one timestamp/two times
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-50376@lists.php.net to get a copy of this message
 ID:               26236
 User updated by:  rm at duxx dot nl
 Reported By:      rm at duxx dot nl
-Status:           Open
+Status:           Closed
 Bug Type:         MySQL related
 Operating System: Winnt4
 PHP Version:      4.3.4
 New Comment:

Yoe're right: 11.13.2003-09:38:34; only one hour because of the
handling of timezones. Thanks !


Previous Comments:
------------------------------------------------------------------------

[2003-11-14 03:51:06] Leblanc at phpzipscript dot org

You mistake is here :
echo date("m.d.Y-h:m:s", 1068716314); 

should be :
echo date("m.d.Y-h:i:s", 1068716314); 

'm' is for month... not minutes (which is 'i').

------------------------------------------------------------------------

[2003-11-14 03:09:42] rm at duxx dot nl

Both Apache and MySQL are running on the same server.

------------------------------------------------------------------------

[2003-11-13 19:22:17] iliaa@php.net

Is the MySQL and PHP running on the same server?

------------------------------------------------------------------------

[2003-11-13 07:16:33] rm at duxx dot nl

Description:
------------

In MYSQL this was the result of
 SELECT CURDATE(), CURTIME(), UNIX_TIMESTAMP()

+------------+-----------+------------------+
| CURDATE()  | CURTIME() | UNIX_TIMESTAMP() |
+------------+-----------+------------------+
| 2003-11-13 | 10:38:34  |       1068716314 |
+------------+-----------+------------------+


Under PHP however the result of
 echo date("m.d.Y-h:m:s", 1068716314); // the same timestamp

I get
 11.13.2003-09:11:34


So you can see 10:38:34 and 9:11:34 for the same timestamp.

Now one hour could be explained because of a the timzone of +1, where
where did those 27 minutes go ?

(I didn't find this on version 4.1.3)

Reproduce code:
---------------
 

Expected result:
----------------
 

Actual result:
--------------
 


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26236&edit=1


Thread (6 messages)

« previous php.bugs (#50376) next »