From 836add68f2f6648f407bf0a3e2f48757aa50613c Mon Sep 17 00:00:00 2001 From: Robert Anderson <randerson@lbsd.net> Date: Mon, 29 Jun 2009 10:19:57 +0000 Subject: [PATCH] Convert string to valid formatted datetime --- webgui/include/db.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/webgui/include/db.php b/webgui/include/db.php index acd04723..9162addf 100644 --- a/webgui/include/db.php +++ b/webgui/include/db.php @@ -257,12 +257,10 @@ function DBSelectSearch($query,$search,$filters,$sorts) { } elseif ($data['comparison'] == "eq") { $match = "="; } - # Convert to ISO format - # FIXME -# $unixtime = str2time($data['value']); -# $date = DateTime->from_epoch( epoch => $unixtime ); -# $value = $db->quote($date->ymd()); + # Convert to ISO format + $date = new DateTime($data['value']); + $value = $db->quote($date->format('Y-m-d')); } elseif ($data['type'] == "list") { # Quote all values -- GitLab