3 ms·
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
by rsyring 6y ago
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.
- rileymat2 6y agoThat 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.