|
|
@ -1479,12 +1479,17 @@ class rcube_utils |
|
|
|
} |
|
|
|
|
|
|
|
if (strpos($format, 'u') !== false) { |
|
|
|
$dt = number_format(microtime(true), 6, '.', ''); |
|
|
|
$dt .= '.' . date_default_timezone_get(); |
|
|
|
$dt = number_format(microtime(true), 6, '.', ''); |
|
|
|
|
|
|
|
try { |
|
|
|
$date = date_create_from_format('U.u', $dt); |
|
|
|
$date->setTimeZone(new DateTimeZone(date_default_timezone_get())); |
|
|
|
|
|
|
|
if ($date = date_create_from_format('U.u.e', $dt)) { |
|
|
|
return $date->format($format); |
|
|
|
} |
|
|
|
catch (Exception) { |
|
|
|
// ignore, fallback to date()
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return date($format); |
|
|
|