Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DST inverted for Asia/Casablanca #13

Open
gopi-ar opened this issue Oct 17, 2024 · 0 comments
Open

DST inverted for Asia/Casablanca #13

gopi-ar opened this issue Oct 17, 2024 · 0 comments

Comments

@gopi-ar
Copy link

gopi-ar commented Oct 17, 2024

On PHP 8.2.20 with timezonedb timezonedb-2024.2, the following code returns the correct time offsets, but in my view incorrect DST values.

$timeZone = new DateTimeZone('Africa/Casablanca');
$trans = $timeZone->getTransitions(time(), strtotime('+1 years', time()));
var_export($trans);
array (
  0 => 
  array (
    'ts' => 1729145851,
    'time' => '2024-10-17T06:17:31+00:00',
    'offset' => 3600,
    'isdst' => false,
    'abbr' => '+01',
  ),
  1 => 
  array (
    'ts' => 1740276000,
    'time' => '2025-02-23T02:00:00+00:00',
    'offset' => 0,
    'isdst' => true,
    'abbr' => '+00',
  ),
  2 => 
  array (
    'ts' => 1743904800,
    'time' => '2025-04-06T02:00:00+00:00',
    'offset' => 3600,
    'isdst' => false,
    'abbr' => '+01',
  ),

Though iana's db doesn't really say 'Daylight' for this time, this offset is generally considered DST. Others mark this as DST.

This excerpt from Wiki also calls it DST:

Since 2019, Morocco observes daylight saving time every month but Ramadan. During the holy month (the date of which is determined by the lunar calendar and thus moves annually with regard to the Gregorian calendar), the country's civil clocks observe Western European Time (UTC+00:00, which geographically overlaps most of the nation). At the close of that month, its clocks are turned forward to Western European Summer Time (UTC+01:00).[51][52][53]

Some more sources:
https://www.moroccoworldnews.com/2019/06/275946/morocco-study-ditching-clock-gmt1-dst
https://www.moroccoworldnews.com/2021/11/345482/potential-removal-of-daylight-savings-time-in-morocco

Based on this, should the 'isdst' value be true for all months except the Ramadan month for Africa/Casablanca and Africa/El_Aaiun?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant