diff options
author | Kevin Chabowski <kevin@kch42.de> | 2012-02-03 22:43:39 +0100 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2012-02-03 22:43:39 +0100 |
commit | 260b0f285e8d3c323076f58098c59dda6d8a6a5d (patch) | |
tree | a9fb1068ba4acbae0b98fb539622dff44cba07a9 /ratatoeskr | |
parent | 86deada91a275ec1372817603758ab771cfaa417 (diff) | |
download | ratatoeskr-cms-260b0f285e8d3c323076f58098c59dda6d8a6a5d.tar.gz ratatoeskr-cms-260b0f285e8d3c323076f58098c59dda6d8a6a5d.tar.bz2 ratatoeskr-cms-260b0f285e8d3c323076f58098c59dda6d8a6a5d.zip |
Fixed date/time interpretation.
Diffstat (limited to 'ratatoeskr')
-rw-r--r-- | ratatoeskr/backend.php | 4 |
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(); |