aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr/backend.php
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2012-02-03 22:43:39 +0100
committerKevin Chabowski <kevin@kch42.de>2012-02-03 22:43:39 +0100
commit260b0f285e8d3c323076f58098c59dda6d8a6a5d (patch)
treea9fb1068ba4acbae0b98fb539622dff44cba07a9 /ratatoeskr/backend.php
parent86deada91a275ec1372817603758ab771cfaa417 (diff)
downloadratatoeskr-cms-260b0f285e8d3c323076f58098c59dda6d8a6a5d.tar.gz
ratatoeskr-cms-260b0f285e8d3c323076f58098c59dda6d8a6a5d.tar.bz2
ratatoeskr-cms-260b0f285e8d3c323076f58098c59dda6d8a6a5d.zip
Fixed date/time interpretation.
Diffstat (limited to 'ratatoeskr/backend.php')
-rw-r--r--ratatoeskr/backend.php4
1 files changed, 2 insertions, 2 deletions
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();