question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I see there is support to change the default time zone for the host. Good practice is to always have the host on UTC time, but it does not appear that the app currently uses the browsers time zone for caclulating the current datetime, it simply uses the servers time. Is this accurate?

I am not very strong in django, but i think this needs to be added to allow the browser to use its own time zone. J ust struggling with where:

from django.utils.timezone import activate
activate(settings.TIME_ZONE)

Source: https://docs.djangoproject.com/en/2.0/topics/i18n/timezones/#default-current-time-zone

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
cdubzcommented, May 13, 2019

Yes, I have noticed that to. I think this is because the UI relies on the framework to set the TZ on the server side. So if you set the TZ correctly there (see the TIME_ZONE env var for an example of how to this), everything should work out correctly.

At any rate, this is certainly confusing and needs to be fixed. It is the next thing I intend to work on, but my little one is now dealing with daycare and separation anxiety. Finding myself missing the immobile, sleep-filled days (:

0reactions
cdubzcommented, Jan 19, 2020

Today I also noticed that the timezone in the frontend is handled differently in different forms too, which is bad. E.g. the Start Timer autofills the date and time with the timezone from the application timezone while all the other add entry forms (e.g. Add Diaper Change) use the local timezone from the browser.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Time Zone Map - Time and Date
The timeanddate.com Time Zone Map gives an overview of current local times around the world. It takes into account daylight saving time (DST)...
Read more >
Time zone - Wikipedia
A time zone is an area which observes a uniform standard time for legal, commercial and social purposes. Time zones tend to follow...
Read more >
TimeZone
No information is available for this page.
Read more >
US Time Zone Map
An easy US Time zone map with interactive times, see current time for Pacific, Mountain, Central, and Eastern, Alaskan, and Hawaiin time zones....
Read more >
United States Time Zone
The United States uses nine standard time zones. From east to west they are Atlantic Standard Time (AST), Eastern Standard Time (EST), Central...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found