)]}'
{
  "commit": "eaaaaee1dc1aacededf4a89bc4544558f425d5f1",
  "tree": "774c92c6bf379dfb9dc72448af01350b4b8db853",
  "parents": [
    "942780bbc19517df4948a6dbc8c33d2228e5f905"
  ],
  "author": {
    "name": "gremat",
    "email": "50012463+gremat@users.noreply.github.com",
    "time": "Mon Mar 02 08:57:12 2026 +0000"
  },
  "committer": {
    "name": "Alex Brainman",
    "email": "alex.brainman@gmail.com",
    "time": "Mon Mar 02 17:51:03 2026 -0800"
  },
  "message": "windows/registry: correct KeyInfo.ModTime calculation\n\nFiletime.Nanoseconds() has a major drawback: the returned int64 is too small to\nrepresent Filetime\u0027s zero value (January 1, 1601, [1]) in terms of nanoseconds\nsince Epoch (00:00:00 UTC, January 1, 1970); MinInt64 [2] only dates back to\nyear 1677.\n\nThis has real-life implications, e.g., some Windows sub systems (Perflib, to\n    name one) create registry keys with the last write time property set to\nzero (see note below). In this case, ModTime() reports an underflow-affected\nvalue of 2185-07-22T00:34:33.709551+01:00.\n\nThis commit drops usage of Nanoseconds() in favor of a conversion that converts\nfirst to seconds and nanoseconds before gauging thus is capable to cover the\nfull range of Filetime values.\n\nA note on last write time values: `lastWriteTime` is not exposed in the UI\n(say, `regedit`) or in PowerShell (`Get-ItemProperty`), you need to query\n`RegQueryInfoKeyA` [3] explicitly in some way [4] or another [5]. The source of\nthe latter is offline by now but can be found elsewhere [6] and provides a\nquick way to show the value.\n\n[1] https://learn.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime\n[2] https://pkg.go.dev/math#pkg-constants\n[3] https://learn.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regqueryinfokeya?redirectedfrom\u003dMSDN\n[4] https://learn.microsoft.com/en-us/windows/win32/sysinfo/retrieving-the-last-write-time\n[5] https://learn-powershell.net/2014/12/18/retrieving-a-registry-key-lastwritetime-using-powershell/\n[6] https://github.com/wxrdnx/GetRegistryKeyLastWriteTimeAndClassName\n\nFixes golang/go#74335.\n\nChange-Id: I83dc1d6b5e0c581bfb53d58ee08a21ed9c166b0f\nGitHub-Last-Rev: 0073d1d313b2c986360f3a06ffeceb6b331c0d9a\nGitHub-Pull-Request: golang/sys#251\nReviewed-on: https://go-review.googlesource.com/c/sys/+/682816\nReviewed-by: Alex Brainman \u003calex.brainman@gmail.com\u003e\nLUCI-TryBot-Result: Go LUCI \u003cgolang-scoped@luci-project-accounts.iam.gserviceaccount.com\u003e\nReviewed-by: Russ Cox \u003crsc@golang.org\u003e\nReviewed-by: David Chase \u003cdrchase@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7f1ac70e8fa01cf1b18e36edda1afde3ce61ca6f",
      "old_mode": 33188,
      "old_path": "windows/registry/export_test.go",
      "new_id": "f3a30e2468bd3bbca76d5861c0e61e5838ebe222",
      "new_mode": 33188,
      "new_path": "windows/registry/export_test.go"
    },
    {
      "type": "modify",
      "old_id": "39aeeb644f5512ef68ab3741e16d2a1d5643895a",
      "old_mode": 33188,
      "old_path": "windows/registry/key.go",
      "new_id": "7cc6ff3afa09fc39a66f366cefedd119b53b366b",
      "new_mode": 33188,
      "new_path": "windows/registry/key.go"
    },
    {
      "type": "modify",
      "old_id": "6e7bec505e517e9ee4ab027e6f6e23f9be89f14a",
      "old_mode": 33188,
      "old_path": "windows/registry/registry_test.go",
      "new_id": "995acc96bfde8c108ac58c9c652065b46c47687f",
      "new_mode": 33188,
      "new_path": "windows/registry/registry_test.go"
    }
  ]
}
