Skip to content

Commit 02e6350

Browse files
author
David Monllao
committed
Merge branch 'MDL-61027-master' of git://github.com/rezaies/moodle
2 parents 69b4a73 + 4258177 commit 02e6350

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

user/profile/field/datetime/field.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ public function edit_save_data_preprocess($datetime, $datarecord) {
8181
}
8282

8383
if (is_numeric($datetime)) {
84-
$datetime = userdate($datetime, '%Y-%m-%d-%H-%M-%S');
84+
$gregoriancalendar = \core_calendar\type_factory::get_calendar_instance('gregorian');
85+
$datetime = $gregoriancalendar->timestamp_to_date_string($datetime, '%Y-%m-%d-%H-%M-%S', 99, true, true);
8586
}
8687

8788
$datetime = explode('-', $datetime);

0 commit comments

Comments
 (0)