silinging warnings?

From: Date: Sat, 28 Jun 2003 10:08:08 +0000
Subject: silinging warnings?
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-17811@lists.php.net to get a copy of this message
Hi, I have a question about MDB_Date that might result in a standard we may want to set: MDB_Date is a very simple class to help people convert their timestamps from and to the MDB timestamp format (which essentially is an ISO date). Due to its simple nature it uses something like the following to convert form a unix timestamp to an MDB timestamp: function unix2Mdbstamp($unix_timestamp) { return date('Y-m-d H:i:s', $unix_timestamp); } This can lead to odd results if the unix timestamp is less than 0. I want to keep the code as simple as possible, because people can move to the PEAR::Date if they need anything more fancy. So should I silence the errors that may come up due to the date() call? Should the users make the necessary checks in his code to prevent calling with a unix timestamp less than 0? Again I would prefer not to have to introduce any fancy code to handle values outside the scope. Regards, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07

« previous php.pear.dev (#17811) next »