Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Fix timestamps #18

Closed
wants to merge 3 commits into from
Closed

Conversation

jcorrego
Copy link

moment.js library is already initializing detecting user timezone (UTC-5 in my case). So, setting moment.tz.setDefault(App.timezone); using laravel config timezone, alters the default moment() object and produces an object with the time displaced twice. Calculating the timezone diff and adding it to the startTime value was causing and infinite increment every time the component loads.

I tested this in a brand new laravel 8 installation, and worked ok, detecting my timezone.

moment.js library is already using the correct timezone, so adding this generates and increment on the starting time.
Unless laravel timezone was UTC, this was generating an incorrect moment object.
One line fix
@nunomaduro
Copy link
Member

Thanks for contributing. This issue has been addressed: 3d7d269.

The release v0.0.8 contains this fixed.

@nunomaduro nunomaduro closed this Sep 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants