Skip to content

Wrong hour in timezone "Africa/Cairo" from 2023 #706

@psyking841

Description

@psyking841
  • OS version and name: OSX 13.3.1 (22E261)
  • Pendulum version: 2.1.2

Issue

In 2023, Cairo has started daylight saving in 2023 on 2023-04-27T21:00:00 UTC.
This 2023-04-27T21:00:00 UTC should be local time 2023-04-28T00:00:00 (Cairo time). However, in pendulumn this is still converted to 2023-04-27T23:00:00 (Cairo time)
Please see the replay below:

>>> dt = pendulum.datetime(2023, 4, 27, 21)
>>> dt
DateTime(2023, 4, 27, 21, 0, 0, tzinfo=Timezone('UTC'))
>>> dt.in_timezone('Africa/Cairo')
DateTime(2023, 4, 27, 23, 0, 0, tzinfo=Timezone('Africa/Cairo'))

Basically, pendumlum is not implementing daylight saving for Africa/Cairo time.

This is related to this issue: #700 where Mexico has made the similar decision in 2023.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions