-
-
Notifications
You must be signed in to change notification settings - Fork 34
When user timezone is Europe/Lisbon
, the tempo's range
function throws an "Invalid offset" exception.
#59
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
Comments
I just started seeing this when I updated FormKit to 1.5.7 and FormKit Pro to 0.126.11, but I'm in Can you recommend a version to revert to until this issue is fixed? |
To be clear, the error I'm seeing is Invalid offset: -05:32.18333333333334 |
So sorry for spamming the comments here! I should mentioned that the problem occurs with the following schema: [
{
$formkit: 'datepicker',
name: 'date',
format: 'DD-MMM-YYYY',
valueFormat: 'YYYY-MM-DD',
validation: 'required',
overlay: true,
},
] |
Wow, this is obscure. It has to do with the really old dates in certain timezones. When we use the new Date('1904-06-06T00:00:00')
// 1904-06-06T05:32:11.000Z where is that 32:11 coming from? Well it turns out that January 1st 1905 the clocks moved from LMT to CST — so the resulting time is actually accurate. Our internal methods were not expecting a timezone offset to have seconds in them. Since these 11 seconds are not particularly important we will round them going forward. |
@kswedberg this should be fixed in |
Thanks so much, @justin-schroeder ! Works like a charm now 😃 |
Reproduction can be seen on the @formkit/tempo docs itself by editing the
range
example and passing the tokenyears
. Issue occurs when timezone isEurope/Lisbon
though I'm sure there are others.The text was updated successfully, but these errors were encountered: