Click here to Skip to main content
15,116,323 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 Andersson11-May-21 0:23
professionalJörgen Andersson11-May-21 0:23 
GeneralRe: How did I not know this? Pin
Sander Rossel11-May-21 0:43
professionalSander Rossel11-May-21 0:43 
GeneralRe: How did I not know this? Pin
Jörgen Andersson11-May-21 0:46
professionalJörgen Andersson11-May-21 0:46 
GeneralRe: How did I not know this? Pin
Sander Rossel11-May-21 1:28
professionalSander Rossel11-May-21 1:28 
GeneralRe: How did I not know this? Pin
StarNamer_11-May-21 4:39
professionalStarNamer_11-May-21 4:39 
GeneralRe: How did I not know this? Pin
Sander Rossel11-May-21 12:04
professionalSander Rossel11-May-21 12:04 
GeneralRe: How did I not know this? Pin
Fabio Franco12-May-21 1:35
professionalFabio Franco12-May-21 1:35 
GeneralRe: How did I not know this? Pin
Dan Neely10-May-21 10:41
MemberDan Neely10-May-21 10: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 23:21
professionalSander Rossel10-May-21 23:21 
GeneralRe: How did I not know this? Pin
JamesRuzinok11-May-21 4:33
MemberJamesRuzinok11-May-21 4:33 
GeneralRe: How did I not know this? Pin
DRHuff10-May-21 10:38
MemberDRHuff10-May-21 10:38 
GeneralRe: How did I not know this? Pin
Mircea Neacsu10-May-21 5:14
mvaMircea Neacsu10-May-21 5:14 
GeneralRe: How did I not know this? Pin
kmoorevs10-May-21 5:57
Memberkmoorevs10-May-21 5:57 
GeneralRe: How did I not know this? Pin
Jacquers10-May-21 6:21
MemberJacquers10-May-21 6:21 
GeneralRe: How did I not know this? Pin
Sander Rossel10-May-21 6:48
professionalSander Rossel10-May-21 6:48 
GeneralRe: How did I not know this? Pin
Keith Barrow10-May-21 10:07
professionalKeith Barrow10-May-21 10:07 
GeneralRe: How did I not know this? Pin
Nelek10-May-21 7:58
protectorNelek10-May-21 7:58 
GeneralRe: How did I not know this? Pin
Dan Neely10-May-21 10:43
MemberDan Neely10-May-21 10:43 
GeneralRe: How did I not know this? Pin
Nelek11-May-21 1:03
protectorNelek11-May-21 1:03 
GeneralRe: How did I not know this? Pin
Sander Rossel10-May-21 22:59
professionalSander Rossel10-May-21 22:59 
GeneralRe: How did I not know this? Pin
Nelek11-May-21 1:02
protectorNelek11-May-21 1:02 
GeneralRe: How did I not know this? Pin
Sander Rossel11-May-21 1:28
professionalSander Rossel11-May-21 1:28 
GeneralRe: How did I not know this? Pin
Nelek11-May-21 1:32
protectorNelek11-May-21 1:32 
GeneralRe: How did I not know this? Pin
Sander Rossel11-May-21 1:34
professionalSander Rossel11-May-21 1:34 
GeneralRe: How did I not know this? Pin
Gerry Schmitz10-May-21 10:26
mveGerry Schmitz10-May-21 10: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.