tiny-date-picker icon indicating copy to clipboard operation
tiny-date-picker copied to clipboard

Timezone is ignored

Open j6s opened this issue 7 years ago • 0 comments

When using tiny-date-picker in a timezone that is not GMT the date objects in the state do not always correspond to the correct dates in your timezone.

Example: https://codepen.io/j6s/pen/OaZyLJ

screenshot_2018-11-23_17-13-39

As you might have guessed from the screenshot I am currently in GMT+1 - thus the date in my screenshot is off by one hour.

Without digging deeper into the code it seems like the date is selected as a GMT timestamp but then used to create a Date object which is in my local timezone.

j6s avatar Nov 23 '18 16:11 j6s