-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
POSIX-TZ and last transition time #17
Comments
Works for me: luatz = require("luatz")
sydney_ts = luatz.time_in("Australia/Sydney")
sydney = luatz.timetable.new_from_timestamp(sydney_ts)
print(sydney)
print(os.date("!%c", math.floor(sydney_ts)))
os.execute("env TZ=Australia/Sydney date")
Are you able to attach your tzfile? |
Thanks! Maybe I need to update by tz files ...
I have attached the relevant file below.
…On 2023-03-20, daurnimator wrote:
Works for me:
```lua
luatz = require("luatz")
sydney_ts = luatz.time_in("Australia/Sydney")
sydney = luatz.timetable.new_from_timestamp(sydney_ts)
print(sydney)
print(os.date("!%c", math.floor(sydney_ts)))
os.execute("env TZ=Australia/Sydney date")
```
```
$ lua 17.lua
2023-03-21T13:19:30.597
Tue Mar 21 13:19:30 2023
Tue 21 Mar 2023 13:19:30 AEDT
```
Are you able to attach your tzfile?
--
Kind regards,
Yorick Hardy
|
Oops, github does not seem to like the attachment. Let me try again (in a zip file). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried the following code fragment:
and the output:
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.
The text was updated successfully, but these errors were encountered: