Mercurial > hgrepos > Python > apps > py-cutils
comparison cutils/treesum.py @ 152:46cb438fa520
Truncate the timestamp in the output to seconds
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sat, 04 Jan 2025 15:31:39 +0100 |
| parents | b26c4290e928 |
| children | 3505406ef9f3 |
comparison
equal
deleted
inserted
replaced
| 151:b26c4290e928 | 152:46cb438fa520 |
|---|---|
| 268 outfp.write(format_bsd_line("FLAGS", ",".join(flags), None, False)) | 268 outfp.write(format_bsd_line("FLAGS", ",".join(flags), None, False)) |
| 269 outfp.flush() | 269 outfp.flush() |
| 270 | 270 |
| 271 if minimal is None: | 271 if minimal is None: |
| 272 # Write execution timestamps in POSIX epoch and ISO format | 272 # Write execution timestamps in POSIX epoch and ISO format |
| 273 ts = time.time() | 273 ts = int(time.time()) |
| 274 outfp.write(format_bsd_line("TIMESTAMP", ts, None, False)) | 274 outfp.write(format_bsd_line("TIMESTAMP", ts, None, False)) |
| 275 ts = (datetime.datetime.utcfromtimestamp(ts)).isoformat("T") | 275 ts = (datetime.datetime.utcfromtimestamp(ts)).isoformat("T") |
| 276 outfp.write(format_bsd_line("ISOTIMESTAMP", ts, None, False)) | 276 outfp.write(format_bsd_line("ISOTIMESTAMP", ts, None, False)) |
| 277 outfp.flush() | 277 outfp.flush() |
| 278 | 278 |
