Skip to content

Commit

Permalink
MDL-46676 profilefield_datetime: Use moodle time API
Browse files Browse the repository at this point in the history
  • Loading branch information
ikawhero committed Aug 6, 2014
1 parent 6b7a5f8 commit eee25b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions user/profile/field/datetime/field.class.php
Expand Up @@ -79,7 +79,7 @@ public function edit_save_data_preprocess($datetime, $datarecord) {
// 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);
Expand Down Expand Up @@ -110,4 +110,4 @@ public function display_data() {
return userdate($this->data, $format);
}
}
}
}

0 comments on commit eee25b4

Please sign in to comment.