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

Re: Git should preserve modification times at least on request

From
'B'Peter Backes' <rtc@helen.plasma.xg8.de>
Date
Feb 22, 2018, 02:05 UTC
Message-ID
<20180222020535.GA11063@helen.PLASMA.Xg8.DE>
In-Reply-To
<007d01d3ab6f$e5439f10$afcadd30$@nexbridge.com>
On Wed, Feb 21, 2018 at 06:58:34PM -0500, Randall S. Becker wrote:
> May I suggest storing the date/time in UTC+0 in all cases. I can see
> potential issues a couple of times a year where holes exist. I cannot even
> fathom what would happen on a merge or edit of history.

I consider storing the timestamp simply in the traditional seconds-since-epoch UNIX timestamp format. But I'm not entirely sure yet (see below).

If a timestamp includes the offset, there shouldn't be any issue with holes. UTC+0 is nice, too, of course, though some might want to preserve the timezone in which the timestamp was actually created.

The bigger issue is usually to copy with those pesky leap seconds. It makes a difference whether one uses solar seconds ("posix" style; those are more commonly seen) or atomic seconds ("right" style) for the UNIX timestamp. Those differences accumulate over time, so you can have almost half a minute delta if you are not careful with timestamp conversion. If I remember correctly, rcs uses some rather awkward interative convergence algorithm to portably convert from human-readable date and time to UNIX timestamps.

Thus I'm still not sure whether it will be a UNIX-format timestamp or whether a human-readable date/time might be preferrable.

Best wishes Peter

-- 
Peter Backes, rtc@helen.PLASMA.Xg8.DE
Previous: Randall S. BeckerNext: Andreas Krey
Message 24 of 28 in “Git should preserve modification times at least on request”
  1. Peter BackesFeb 19, 2018
  2. Johannes SchindelinFeb 19, 2018
  3. Peter BackesFeb 19, 2018
  4. Theodore Ts'oFeb 20, 2018
  5. Johannes SchindelinFeb 20, 2018
  6. Peter BackesFeb 20, 2018
  7. Peter BackesFeb 20, 2018
  8. Johannes SchindelinFeb 20, 2018
  9. Peter BackesFeb 20, 2018
  10. Phillip WoodFeb 21, 2018
  11. Randall S. BeckerFeb 19, 2018
  12. Hilco WijbengaFeb 19, 2018
  13. Hilco WijbengaFeb 20, 2018
  14. Jeff KingFeb 20, 2018
  15. Peter BackesFeb 20, 2018
  16. Jacob KellerFeb 21, 2018
  17. Junio C HamanoFeb 20, 2018
  18. Derek FawcusFeb 21, 2018
  19. Ævar Arnfjörð BjarmasonFeb 21, 2018
  20. Peter BackesFeb 21, 2018
  21. Ævar Arnfjörð BjarmasonFeb 21, 2018
  22. Peter BackesFeb 21, 2018
  23. Randall S. BeckerFeb 21, 2018
  24. 'Peter Backes'Feb 22, 2018
  25. Andreas KreyFeb 26, 2018
  26. 'Peter Backes'Feb 26, 2018
  27. Derek FawcusFeb 22, 2018
  28. Konstantin KhomoutovFeb 23, 2018

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.