You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I figured it out that Verite's TimelineJS doesn't support timezone on its rendering. That will show whatever passed over in JSON input. It uses another third party module DateTimeFormat that can offset timezone from UTC, but the option is turned off - the third argument in the line below.
timeline.js
_date=dateFormat(d,format,false);
The solution we have to reflect timezone are either we change Verite's TimelineJS or supports it from Django-TimelineJS. The first option will take the user setting from browser, and the latter case will take from Django's settings.py.
Since I need additional information of hour & minute besides date, I have changed a model from DateField to DateTimeField for my own use. If this also helps others, I can send this via Pull Request.
Hi,
I would like to know if anyone else also experience the same.
I'm setting the timezon in Django:
settings.py
TIME_ZONE = 'Asia/Tokyo'
... that helps save my Tokyo timezone inputs into SQLite DB in UTC.
However, browser renders the UTC times as it is, and it's not reflecting the browser/client time locale.
I found that the codes in the timeline.js by Verite that offset OTC time to the local, but not sure why it's not working in Django's model.
The text was updated successfully, but these errors were encountered: