tzdata-generate
tzdata-generate copied to clipboard
Something wrong with Kazakhstan TZ change on 2024-02-29
Hi, I'm using your 2024a tzdata NPM modules to create this web page https://tzchange.jeremywall.dev/ that shows the next upcoming TZ changes. When you view the web site it shows you the next upcoming changes based on the current time but you can include a "ts" query parameter to lock the output to a specific point in time.
Based on your 2024a data if you view https://tzchange.jeremywall.dev/?ts=1709190589 you see the next upcoming TZ change is the change for Kazakhstan unifying on a 5 hour offset. However, your data says the Unix/Epoch timestamp this change happens at is 1709251200 (2024-03-01 00:00:00 UTC) but when I use the latest 2024a TZDB in Java the Unix/Epoch timestamp of the transition time is 1709229600 (2024-02-29 18:00:00 UTC).
I'm afraid the Java TZDB has the right data and your generated tzdata is incorrect.
I don't have time to dive into it right now, so for now just a clarifying question: how are you retrieving the timestamp from the data? Directly or through eg momentjs?
I will look into it later this week; to me it would be strange for a timestamp to be off as its direct copy from IANA tz data. Could it be that one of the two is expressed in zone time and the other one is not?
Again, I will look at it
No worries, I'm just reporting this in an attempt to figure out where the data is not being interpreted correctly. I'm also using the timezonecomplete library and not momentjs. I'll have to do some more digging too to see if that's the source of the issue. I've been using your libraries and timezonecomplete on this web page for years now and this is the first time there is incorrect data so I'm scratching my head as well.
do you have a code example with timezonecomplete?
Here is an example for the case with the latest tzdb (1.0.40)
import data from "tzdata/tzdata.js"
import * as tz from "timezonecomplete/dist/lib/timezone.js"
import { TzDatabase } from "timezonecomplete/dist/lib/tz-database.js"
TzDatabase.init(data)
const offset = tz
.zone("Asia/Almaty", true)
.offsetForUtc(2024, 2, 29, 23, 59, 0, 0)
console.log("offset", offset)
Offset is 360, though seems should be 300 at this point.