diff --git a/include/class.forms.php b/include/class.forms.php
index 7b5fab20a6f334b1f4417cd4d0d509b1ded28761..1f27486edecce19becd8812634c742554f40cf31 100644
--- a/include/class.forms.php
+++ b/include/class.forms.php
@@ -1139,9 +1139,8 @@ class DatetimePickerWidget extends Widget {
 
         $config = $this->field->getConfiguration();
         if ($this->value) {
-            $this->value = (is_int($this->value) ? $this->value :
-                DateTime::createFromFormat($cfg->getDateFormat(), $this->value)
-                ->format('U'));
+            $this->value = is_int($this->value) ? $this->value :
+                strtotime($this->value);
             if ($config['gmt'])
                 $this->value += 3600 *
                     $_SESSION['TZ_OFFSET']+($_SESSION['TZ_DST']?date('I',$this->value):0);