note 24136 deleted from function.strtotime by sniper

From: Date: Tue, 21 Oct 2003 11:03:14 +0000
Subject: note 24136 deleted from function.strtotime by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-59019@lists.php.net to get a copy of this message
Note Submitter: lists@darkcore.net ---- As noted by others, strtotime won't work with PostgreSQL dates because of the floating point seconds. Here is a simple work around. $var = "2002-08-02 15:09:18.41114-05"; $datetime = substr($var, 0, strpos($var, ".")); print(strtotime($datetime));

« previous php.notes (#59019) next »