904
(page 3) 50 comments
sorted by: hot top controversial new old
[-] Sam_Bass@lemmy.world 4 points 5 months ago
[-] Truck_kun@beehaw.org 3 points 5 months ago* (last edited 5 months ago)

OMG, I'm dealing with a developer right now that is dealing with patient collected samples in several timezones, allowing the patients to either enter the time they collected, or use current time, and storing it in UTC time.

We do not receive any timezone data, patient collection data is showing different days than the patient could write on their samples depending on the time of day, and the developer said 'just subtract X hours' (our timezone).... for which not all patients would live in.

I suppose I could, if they'd provide the patient's timezone, but they don't even collect that. Can you just admit your solution is bad? It's fine to store a timestamp in UTC, but not user provided data... don't expect average users to calculate their time (and date) in UTC please.

[-] MrScruff@lemmy.ml 2 points 5 months ago

Depends on what's collecting the information. If it's a website, then the client-side code could most certainly normalize everything to UTC based on the browsers time zone before submitting. That's what I would probably do, if the user's time zone isn't needed or wanted..

[-] SpaceCowboy@lemmy.ca 2 points 5 months ago

This is actually the best approach.

Obviously they are getting timezone information otherwise the app could only display whatever time the user entered in.

If you want to sort things by the actual time, it's simple and performant if all of the times are in the same timezone, and UTC would be the standard one to use. Pushing the timezone calculations to the client makes sense because the UTC time is correct, it's just a matter of displaying it in a user friendly way, ie. show the time in the user's timezone.

[-] SnotFlickerman@lemmy.blahaj.zone 3 points 5 months ago
[-] numberfour002@lemmy.world 3 points 5 months ago

I would truthfully and happily go back in time and tell people not to waste with the fucked up bullshit technology of the past. I mean Angular 1, what the hell was that? Twitter integration? Fuck you 2010. Zend Framework? You should be hanged. HANGED.

[-] MTK@lemmy.world 3 points 5 months ago

Is GMT and UTC not the same? I'm happy to not have to code for timezones

[-] theherk@lemmy.world 2 points 5 months ago

My suggestion has always been universal sidereal time. It is singular, doesn’t change, and carries no colonial baggage since it rotates around the whole earth. Even suitable as a home time if we become spacefaring.

load more comments (5 replies)
load more comments
view more: ‹ prev next ›
this post was submitted on 29 Jun 2024
904 points (94.9% liked)

Programmer Humor

32576 readers
954 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS