Click here to Skip to main content
15,884,629 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: How did I not know this? Pin
Jörgen Andersson10-May-21 23:23
professionalJörgen Andersson10-May-21 23:23 
GeneralRe: How did I not know this? Pin
Sander Rossel10-May-21 23:43
professionalSander Rossel10-May-21 23:43 
GeneralRe: How did I not know this? Pin
Jörgen Andersson10-May-21 23:46
professionalJörgen Andersson10-May-21 23:46 
GeneralRe: How did I not know this? Pin
Sander Rossel11-May-21 0:28
professionalSander Rossel11-May-21 0:28 
GeneralRe: How did I not know this? Pin
StarNamer@work11-May-21 3:39
professionalStarNamer@work11-May-21 3:39 
GeneralRe: How did I not know this? Pin
Sander Rossel11-May-21 11:04
professionalSander Rossel11-May-21 11:04 
GeneralRe: How did I not know this? Pin
Fabio Franco12-May-21 0:35
professionalFabio Franco12-May-21 0:35 
GeneralRe: How did I not know this? Pin
Dan Neely10-May-21 9:41
Dan Neely10-May-21 9:41 
This is why the format you should use isn't raw UTC< but DateTimeOffset (C#) / datetimeoffset (mssql) / whatever your platform equivalent is, with the offset used to record the timezone where the records data originated from.

Sander Rossel wrote:
Disagree on this one.
The user checks his watch, it says 14:30, and starts driving.
Now, back at home, he wonders at what time they left exactly and is surprised to see 13:30, while he's sure it was around 14:30 (so don't adjust to user's current time).
Also, he get's a call from HQ in America who ask him why he left at 06:00 in the morning (again, they probably want to know local time (too), if not to be able to communicate).
UTC means nothing to users, they barely even know it exists.


Initial departure time is stored as 14:30 CEDT when the user departs from Spain, and 13:45 WEDT on arrival in Portugal.

The UI can then show times in the time they were reported at, the users current time, or if you're feeling overly elaborate an arbitrary user selected one.

So the user making the drive in Portugal could see 14:30 CEDT to 13:45 WEDT (actual time stamps), or 13:30 WEDT to 13:45 WEDT (current local time), or 14:30 CEDT to 14:45 CEDT (user configured to use CEDT as their preferred timezone).

The user how made the drive now back home in Spain could see 14:30 CEDT to 13:45 WEDT (actual time stamps), or 14:30 CEDT to 14:45 CEDT (current local time), or 14:30 CEDT to 14:45 WEDT (user configured to use CEDT as their preferred timezone).

The bean counter user at the HQ in the US somewhere in the rocky mountains would see, 14:30 CEDT to 13:45 WEDT (actual time stamps), or 6:30 MST to 6:45 MST (current local time), or 8:30 EDT to 8:45 EDT (user configured to use CEDT as their preferred timezone). If the users in the HQ are dense enough to be confused by seeing 6:30 MST for an overseas timestamp update the UI to show two values at once Start in your timezone: 6:30 MST, Start in drivers timezone: 14:30 CEDT, and optionally add the "driver crossed timezones hint" as well.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius

GeneralRe: How did I not know this? Pin
Sander Rossel10-May-21 22:21
professionalSander Rossel10-May-21 22:21 
GeneralRe: How did I not know this? Pin
JamesRuzinok11-May-21 3:33
JamesRuzinok11-May-21 3:33 
GeneralRe: How did I not know this? Pin
DRHuff10-May-21 9:38
DRHuff10-May-21 9:38 
GeneralRe: How did I not know this? Pin
Mircea Neacsu10-May-21 4:14
Mircea Neacsu10-May-21 4:14 
GeneralRe: How did I not know this? Pin
kmoorevs10-May-21 4:57
kmoorevs10-May-21 4:57 
GeneralRe: How did I not know this? Pin
Jacquers10-May-21 5:21
Jacquers10-May-21 5:21 
GeneralRe: How did I not know this? Pin
Sander Rossel10-May-21 5:48
professionalSander Rossel10-May-21 5:48 
GeneralRe: How did I not know this? Pin
Keith Barrow10-May-21 9:07
professionalKeith Barrow10-May-21 9:07 
GeneralRe: How did I not know this? Pin
Nelek10-May-21 6:58
protectorNelek10-May-21 6:58 
GeneralRe: How did I not know this? Pin
Dan Neely10-May-21 9:43
Dan Neely10-May-21 9:43 
GeneralRe: How did I not know this? Pin
Nelek11-May-21 0:03
protectorNelek11-May-21 0:03 
GeneralRe: How did I not know this? Pin
Sander Rossel10-May-21 21:59
professionalSander Rossel10-May-21 21:59 
GeneralRe: How did I not know this? Pin
Nelek11-May-21 0:02
protectorNelek11-May-21 0:02 
GeneralRe: How did I not know this? Pin
Sander Rossel11-May-21 0:28
professionalSander Rossel11-May-21 0:28 
GeneralRe: How did I not know this? Pin
Nelek11-May-21 0:32
protectorNelek11-May-21 0:32 
GeneralRe: How did I not know this? Pin
Sander Rossel11-May-21 0:34
professionalSander Rossel11-May-21 0:34 
GeneralRe: How did I not know this? Pin
Gerry Schmitz10-May-21 9:26
mveGerry Schmitz10-May-21 9:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.