News for hackers. Stuff that matters.
Re:Best practices for REST API design (2020) by adolph on Monday February 22, 2021 @06:44PM (#26232167)
>Send ISO date/time in utc.

With offset, ok. As UTC alone, it doesn't work if you need to know the local time when something occurred, like medication administration, especially when the things may occur across time changes like DST.

Re:Best practices for REST API design (2020) by rsyring on Monday February 22, 2021 @09:42PM (#26233287)
Do not just track offset. If you have to deal with date/time locally, you must have the timezone. Treat this just like bytes/Unicode: accept local time on the edges of the app, convert immediately to UTC, store/use UTC internally, convert back to local on the edges at display time. Yes, it can get more complicated than this of doing calendar math, but I'm not aware of anything gained by just tracking offset.
Re:Best practices for REST API design (2020) by rileymat2 on Tuesday February 23, 2021 @08:03AM (#26236793)
That does not work in the op’s use case because the op wants to know the local time of the medication administration.

The endpoint of the viewer may not be in the same local time.

If you go this route you may not care about location beyond this one data point, but have to store another location field each time.