Oct. 18, 2020
9:37 p.m.
On 10/18/20 2:10 PM, Robert Elz wrote:
Generating the format with the greatest precision available means we're less likely to lose
A better way to do it is to generate an internal format that tells you how much precision is in the timestamp. That way, the output of the date-parsing function gives you all the useful information of the input. Since text timestamps almost invariably use base 10 for subsecond information, the output of the timestamp parser should do likewise, and should say how many digits were in the input. At least, that's how I'd do it if I were extending a timestamp parser.