diff --git a/user/profile/field/datetime/field.class.php b/user/profile/field/datetime/field.class.php index cbf506bdec2..f5b5f5aef88 100644 --- a/user/profile/field/datetime/field.class.php +++ b/user/profile/field/datetime/field.class.php @@ -72,7 +72,7 @@ class profile_field_datetime extends profile_field_base { // If timestamp then explode it to check if year is within field limit. $isstring = strpos($datetime, '-'); if (empty($isstring)) { - $datetime = date('Y-m-d-H-i-s', $datetime); + $datetime = userdate($datetime, '%Y-%m-%d-%H-%M-%S'); } $datetime = explode('-', $datetime); @@ -103,4 +103,4 @@ class profile_field_datetime extends profile_field_base { return userdate($this->data, $format); } } -} \ No newline at end of file +}