5 ms·
> I used to think that way - just treat date times like string encoding. Pick your desired format (UTC/UTF-8), convert into it on input, convert from it on outp
by msla 7y ago
> I used to think that way - just treat date times like string encoding. Pick your desired format (UTC/UTF-8), convert into it on input, convert from it on output as needed.
Not quite what I had in mind, but I suppose you could serialize a ZonedTime<Z> to a string, like you can serialize an integer to a string.
> Both these situations are resolved with local dates/times. The first one should just be a local date, while the second one requires the combination of the local date and the timezone to happen at time of check, not at time of input.
Right. The first example requires a different type, LocalTime, and the second example requires types to change interpretation over time. Neither of these are problems with my scheme. They're problems with UI and system administration.