summaryrefslogtreecommitdiff
path: root/includes/pages/user_settings.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-11-09 17:43:56 +0100
committerGitHub <noreply@github.com>2016-11-09 17:43:56 +0100
commitd43eb41d25d0d5c0509417247030dd6c21118cf6 (patch)
tree2c3f78bf8fbd4215e70af7dbc2ce30cfef674816 /includes/pages/user_settings.php
parentd5d2acc7d80920eef5f0ed779a3738a12d5db348 (diff)
parent22520532c78b3a032aec6ececb7623ba094da8de (diff)
Merge pull request #274 from engelsystem/task-164-shift-view
Task 164 shift view
Diffstat (limited to 'includes/pages/user_settings.php')
-rw-r--r--includes/pages/user_settings.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/pages/user_settings.php b/includes/pages/user_settings.php
index b2ea5752..22ead68b 100644
--- a/includes/pages/user_settings.php
+++ b/includes/pages/user_settings.php
@@ -56,16 +56,16 @@ function user_settings() {
$valid = false;
}
- if (isset($_REQUEST['planned_arrival_date']) && DateTime::createFromFormat("Y-m-d", trim($_REQUEST['planned_arrival_date']))) {
- $planned_arrival_date = DateTime::createFromFormat("Y-m-d", trim($_REQUEST['planned_arrival_date']))->getTimestamp();
+ if (isset($_REQUEST['planned_arrival_date']) && $tmp = parse_date("Y-m-d", $_REQUEST['planned_arrival_date'])) {
+ $planned_arrival_date = $tmp;
} else {
$valid = false;
$msg .= error(_("Please enter your planned date of arrival."), true);
}
if (isset($_REQUEST['planned_departure_date']) && $_REQUEST['planned_departure_date'] != '') {
- if (DateTime::createFromFormat("Y-m-d", trim($_REQUEST['planned_departure_date']))) {
- $planned_departure_date = DateTime::createFromFormat("Y-m-d", trim($_REQUEST['planned_departure_date']))->getTimestamp();
+ if ($tmp = parse_date("Y-m-d", $_REQUEST['planned_departure_date'])) {
+ $planned_departure_date = $tmp;
} else {
$valid = false;
$msg .= error(_("Please enter your planned date of departure."), true);