Skip to content

POSIX-TZ and last transition time #17

@yorickhardy

Description

@yorickhardy

I tried the following code fragment:

local luatz = require("luatz")

local sydney_ts = luatz.time_in("Australia/Sydney")
sydney = luatz.timetable.new_from_timestamp(sydney_ts)

print(sydney)
print(os.date("!%c", sydney_ts))
os.execute("env TZ=Australia/Sydney date")

and the output:

2023-03-15T15:58:08.000
Wed Mar 15 15:58:08 2023
Wed Mar 15 16:58:08 AEDT 2023

differs by an hour. Looking through the code, it seems like the TZ entry is not used "in handling instants after the last transition time stored in the file" as per the documentation for the Version 2 tzfile format:

Linux tzfile.5
NetBSD tzfile.5

I am not sure that I have read everything correctly though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions