From 260b0f285e8d3c323076f58098c59dda6d8a6a5d Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Fri, 3 Feb 2012 22:43:39 +0100 Subject: Fixed date/time interpretation. --- ratatoeskr/backend.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ratatoeskr') diff --git a/ratatoeskr/backend.php b/ratatoeskr/backend.php index 406219e..1085664 100644 --- a/ratatoeskr/backend.php +++ b/ratatoeskr/backend.php @@ -209,10 +209,10 @@ $backend_subactions = url_action_subactions(array( $inputs["excerpt_txtproc"] = $_POST["excerpt_txtproc"]; if(!empty($_POST["date"])) { - if(($time_tmp = strptime(@$_POST["date"], "%Y-%m-%d %H:%M:%S")) === False) + if(($time_tmp = @DateTime::createFromFormat("Y-m-d H:i:s", @$_POST["date"])) === False) $fail_reasons[] = $translation["invalid_date"]; else - $inputs["date"] = @mktime($time_tmp["tm_sec"], $time_tmp["tm_min"], $time_tmp["tm_hour"], $time_tmp["tm_mon"] + 1, $time_tmp["tm_mday"], $time_tmp["tm_year"] + 1900); + $inputs["date"] = @$time_tmp->getTimestamp(); } else $inputs["date"] = time(); -- cgit v1.2.3-70-g09d2