Input.datetime fails the identity test

I found this Input behavior surprising and less than ideal: https://observablehq.com/d/a6be791f9c6adf03

Given a date (input), passing it to Date.datetime, and reading the Input return value (output), input.getTime() !== output.getTime().

What’s your approach to working around this?

Can you please make the notebook public?

whoops, yep! done :slight_smile:

It’s a timezone bug. Fix up here:

3 Likes

There’s no good answer for why this took eight months, lol, but the fix is finally deployed to the site; you can see test cases for the new release here: Inputs v0.10.5 / Observable | Observable. We’ve updated our internal processes so more people can publish this sort of library release and it shouldn’t be so slow or such a bottleneck in the future. :pray: