Skip to content

fix UTC issue#78

Open
emiliobool wants to merge 1 commit intobjsi:masterfrom
emiliobool:master
Open

fix UTC issue#78
emiliobool wants to merge 1 commit intobjsi:masterfrom
emiliobool:master

Conversation

@emiliobool
Copy link
Copy Markdown

This is a weird bug with timezones with an easy fix.

Problem:
When doing any change or even loading the current rep all dates would be decreased by one!

The reason for that is because javascript takes "XXXX-XX-XX" dates as UTC making the string date different:

CleanShot 2022-08-09 at 21 57 38@2x

The solution is to replace "-" for "/" before parsing to a new Date object, that way it will take the timezone into consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant