Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dealing with Local Time
#1
Hello,

Developing an app where users may be in different time zones. In past I never worried about this as system date time stamps matched local time of users.    Now I am looking at  using   Postgres datetime type with time zone support  and need best option for ensuring I have the correct local session time.   Assuming all time is saved as  UTC .

To make maters more interesting it could be case where   driver leaves pt A at  5AM Pacific Time and gets to location at  6PM Pacific time  ( 6 PM Mountain Time) as it crossed a time zone.  The initial  user makes all entries based on   Pacific Time.

User at destination looks at system,  the time would then display for him i mountain time (his local time zone).

Should I set time zone based on setting in user profile or should I get it from the browser setting and have it be dynamic to allow mobile devices to work if user is mobile and goes between timezones. I have some sample code that I will update this ticket with to show what app currently does , but find that it sometimes does not work as desired.


Cheers!
Reply


Messages In This Thread
Dealing with Local Time - by lfeliz - 05-03-2018, 04:45 PM
RE: Dealing with Local Time - by kudzu - 05-04-2018, 12:48 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)