Mercurial > hg > cc > cirrus_work
changeset 304:e58a1e2be56d trim
fixed time-stamp fixup bugs
| author | Henry S. Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Tue, 13 May 2025 13:32:26 +0100 |
| parents | 9e6bc4e941ab |
| children | 3bd6378eb64e |
| files | lib/python/cc/lmh/cdb_one.py |
| diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/python/cc/lmh/cdb_one.py Tue May 13 12:06:01 2025 +0100 +++ b/lib/python/cc/lmh/cdb_one.py Tue May 13 13:32:26 2025 +0100 @@ -35,6 +35,7 @@ wdate: cython.bytes kind: cython.bytes segb: cython.bytes + ts: db_memoryviewslice seg: int res: int i: int @@ -55,7 +56,12 @@ hits += 1 cdx_out.write(memoryview(l)[:-2]) cdx_out.write(b', "lastmod": "') - cdx_out.write(C.value()) + ts = C.value() + if len(ts) > 1 and ts[0] == 48: # b'0', but not _just_ b'0' + cdx_out.write(b'156') + cdx_out.write(ts[1:]) + else: + cdx_out.write(ts) cdx_out.write(b'"}\n') continue elif res == 0:
