Skip to content

week/week_number/week_year are hardcoded to utc_c and are not respecting the time_zone #152

@hwrobel

Description

@hwrobel

When trying to determine a working week number, you want to have it where you are located. Unfortunately, week info is derived in UTC only, so you are off by one depending on the time_zone and time.

For example, Sun 23:00 in America/Detroit means that time has already rolled over to Mon in UTC, leading to an "off-by-one" error when using week functions. There is no workaround other than manually calculating the week number from (year, month, day), which are in local time by reimplementing the algorithm externally.

The week functions must respect the time_zone of the DateTime object, or they have to be assumed in general to be inaccurate by +/-1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions