We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a142a7a + bb82f4e commit ec898f7Copy full SHA for ec898f7
1 file changed
system/I18n/Time.php
@@ -479,21 +479,7 @@ public function getQuarter(): string
479
*/
480
public function getDst(): bool
481
{
482
- // grab the transactions that would affect today
483
- $start = strtotime('-1 year', $this->getTimestamp());
484
- $end = strtotime('+2 year', $start);
485
- $transitions = $this->timezone->getTransitions($start, $end);
486
-
487
- $daylightSaving = false;
488
489
- foreach ($transitions as $transition) {
490
- if ($transition['time'] > $this->format('U')) {
491
- $daylightSaving = (bool) ($transition['isdst'] ?? $daylightSaving);
492
- break;
493
- }
494
495
496
- return $daylightSaving;
+ return $this->format('I') === '1'; // 1 if Daylight Saving Time, 0 otherwise.
497
}
498
499
/**
0 commit comments