Closed pulakkam closed 1 year ago
hey Matti - thank you for the good bug. I think i know what is happening, and it is crazy.
There's some ambiguity when parsing a iso timezone. We get '+05:30' and we try to match it to the most appropriate iana code. We let users clear this up with spacetime(iso, tz)
.
There are cases when those two timezones don't line up - and we flail around trying to guess timezones.
I think that's what's happening here.
can you confirm that this produces the correct results?
isotimes.forEach((isotime) => {
const time = spacetime(isotime, 'ETC/UTC')
console.log(isotime)
console.log(time.format('iso'))
console.log(time.goto('Europe/Helsinki').format('iso'))
console.log()
})
This is pretty dirty. I'll need to think about what the best way to address this is. let me know if that clears it up cheers
Actually the results are identical, no difference between my original code and your version.
oof, sorry! lemme check it out after a good sleep.
oh - yup, this is a dupe of #235 sorry for my code-blindness yeterday i'm working on a fix. it requires a re-write. Hope to have it ready in a couple weeks, atleast as a beta thanks for your patience. the offsets will only be off by an hour, within an hour of a dst change cheers
Hello,
I checked if there are any problems related to DST 2023 in
Europe/Helsinki
and there seem to be some.My test code:
Results:
Is there something I could do to get expected results?
Thank you.