Skip to content
Snippets Groups Projects
Commit ad8e1fb2 authored by daffie's avatar daffie
Browse files

Issue #3512230 by daffie: Update module for Drupal 11.1.4

parent 749c3c3d
Branches
Tags
1 merge request!43update for Drupal 11.1.4
Pipeline #446350 failed
database-settings-example2.png

106 KiB

This diff is collapsed.
......@@ -35,7 +35,7 @@ class Date extends CoreDate {
$timezone = !empty($this->options['timezone']) ? $this->options['timezone'] : NULL;
// Will be positive for a datetime in the past (ago), and negative for a
// datetime in the future (hence).
$time_diff = \Drupal::time()->getRequestMicroTime() - $value;
$time_diff = intval(\Drupal::time()->getRequestMicroTime() - $value);
switch ($format) {
case 'raw time ago':
return $this->dateFormatter->formatTimeDiffSince($value, ['granularity' => is_numeric($custom_format) ? $custom_format : 2]);
......
......@@ -21,8 +21,8 @@ class Date extends CoreDate {
if (!empty($this->value['type']) && $this->value['type'] == 'offset') {
$time = \Drupal::time()->getRequestMicroTime();
$a = new UTCDateTime(($time - $a) * 1000);
$b = new UTCDateTime(($time + $b) * 1000);
$a = new UTCDateTime(intval(($time - $a) * 1000));
$b = new UTCDateTime(intval(($time + $b) * 1000));
}
else {
$a = new UTCDateTime($a * 1000);
......@@ -48,7 +48,7 @@ class Date extends CoreDate {
if (!empty($this->value['type']) && $this->value['type'] == 'offset') {
$time = \Drupal::time()->getRequestMicroTime();
$value = new UTCDateTime(($time + $value) * 1000);
$value = new UTCDateTime(intval(($time + $value) * 1000));
}
else {
$value = new UTCDateTime($value * 1000);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment