git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Millisecond precision in timestamps?

From
Eric S. Raymond <esr@thyrsus.com>
Date
Nov 28, 2012, 07:58 UTC
Message-ID
<20121128075807.GA9912@thyrsus.com>
In-Reply-To
<7v7gp6i3rx.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com>:
> Roundtrip conversions may benefit from sub-second timestamps, but
> personally I think negative timestamps are more interesting and of
> practical use. 
You mean, as in times before the Unix epoch 1970-01-01T00:00:00Z?  

Interesting. I hadn't thought of that. I've never seen a software project under version control with bits that old, which is significant because I've probably done more digging into ancient software than anybody other than a specialist historian or two.

They would have to have been restrospective dates from the get-go. SCCS wasn't built until 1972.

> And if we were to add "committer-timestamp" and friends to support
> negative timestamps anyway (because older tools will not support
> them), supporting sub-second part might be something we want to
> think about at the same time.
That seems eminently reasonable.
Show 12 quoted lines
> We would however need to be extra careful.  How should we express
> half-second past Tue Nov 27 23:24:16 2012 (US/Pacific)?  Would we
> spell it 1354087456.5?  1354087456.500?  Would we require decimal
> representation of floating point numbers to be normalized in some
> way (e.g. minimum number of digits without losing precision)?  The
> same timestamp needs to be expressed the same way, or we will end up
> with different commit objects, which defeats the whole purpose of
> introducing subsecond timestamps to support round-trip conversions.
> 
> If we were to use a separate "subsecond" fields, another thing we
> need to be careful about is the order of these extra fields, exactly
> for the same reason.

I think minimum number of digits without losing precision is about the only alternative that is future-proof - I was going to suggest it for that reason.

-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
Previous: Junio C HamanoNext: David Aguilar
Message 20 of 41 in “Millisecond precision in timestamps?”
  1. Eric S. RaymondNov 27, 2012
  2. Shawn PearceNov 27, 2012
  3. Junio C HamanoNov 27, 2012
  4. Eric S. RaymondNov 27, 2012
  5. Shawn PearceNov 27, 2012
  6. Eric S. RaymondNov 28, 2012
  7. David LangNov 28, 2012
  8. Felipe ContrerasNov 28, 2012
  9. Shawn PearceNov 28, 2012
  10. Jeff KingNov 28, 2012
  11. Jason PyeronNov 28, 2012
  12. Felipe ContrerasNov 28, 2012
  13. Eric S. RaymondNov 28, 2012
  14. Jeff KingNov 28, 2012
  15. Felipe ContrerasNov 28, 2012
  16. Eric S. RaymondNov 28, 2012
  17. Jeff KingNov 28, 2012
  18. Eric S. RaymondNov 28, 2012
  19. Junio C HamanoNov 28, 2012
  20. Eric S. RaymondNov 28, 2012
  21. David AguilarNov 28, 2012
  22. Andreas EricssonNov 28, 2012
  23. Robin RosenbergDec 5, 2012
  24. James CloosDec 10, 2012
  25. Thomas BergNov 28, 2012
  26. Felipe ContrerasNov 28, 2012
  27. Thomas BergNov 28, 2012
  28. Junio C HamanoNov 28, 2012
  29. Andreas EricssonNov 28, 2012
  30. Phil HordNov 29, 2012
  31. Jeff KingNov 29, 2012
  32. Eric S. RaymondNov 28, 2012
  33. Felipe ContrerasNov 28, 2012
  34. Junio C HamanoNov 28, 2012
  35. Pyeron, Jason J CTR (US)Nov 27, 2012
  36. Eric S. RaymondNov 29, 2012
  37. Junio C HamanoNov 29, 2012
  38. Felipe ContrerasNov 29, 2012
  39. Eric S. RaymondNov 29, 2012
  40. Junio C HamanoNov 29, 2012
  41. Eric S. RaymondNov 29, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.