note 54685 deleted from function.unixtojd by danbrown

From: Date: Sun, 20 Jul 2008 02:12:13 +0000
Subject: note 54685 deleted from function.unixtojd by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-141946@lists.php.net to get a copy of this message
Note Submitter: warhog at warhog d0t net ---- Well, that's neither a bug, nor an interesting quirk.. The explanation is quite simple: The Integer containing a julian date (jd) only stores the date, not the time. When you convert a unix-timestamp, which stores also the time, into a jd, the time-information won't be transferred into the jd. When converting back the jd into a unix-timestamp, you'll get a timestamp for the specific day at 2 o'clock am. ( 02:00:00 ) Sample: Timestamp: 1121206013 JD: 2453565 Timestamp from JD: 1121212800 Original Timestamp "d.m.y H:i:s": 13.07.2005 00:06:53 Timstamp from JD "d.m.y H:i:s": 13.07.2005 02:00:00 greetz

« previous php.notes (#141946) next »