Mercurial > public > mercurial-scm > hg-stable
comparison rust/rhg/src/blackbox.rs @ 48599:abbecb5cd6f3
blackbox: change year in logs to ISO 8601 format
AFAIK, year/month/day is not a format than anyone uses. It seems more
sensible to me to use ISO 8601, as that's standard and unambiguously
year-month-day.
Compatibility-wise, I think it's acceptable to change the default
format. It's most for human consumption. It's plausible that a few
tools parse this format, but it has already changed in the past (for
instance to add the current revision).
Differential Revision: https://phab.mercurial-scm.org/D12006
author | Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> |
---|---|
date | Mon, 17 Jan 2022 21:20:46 -0500 |
parents | 7284b524b441 |
children | 137a93125902 |
comparison
equal
deleted
inserted
replaced
48598:011f5218ff2d | 48599:abbecb5cd6f3 |
---|---|
11 // TODO: somehow keep defaults in sync with `configitem` in `hgext/blackbox.py` | 11 // TODO: somehow keep defaults in sync with `configitem` in `hgext/blackbox.py` |
12 const DEFAULT_MAX_SIZE: u64 = ONE_MEBIBYTE; | 12 const DEFAULT_MAX_SIZE: u64 = ONE_MEBIBYTE; |
13 const DEFAULT_MAX_FILES: u32 = 7; | 13 const DEFAULT_MAX_FILES: u32 = 7; |
14 | 14 |
15 // Python does not support %.3f, only %f | 15 // Python does not support %.3f, only %f |
16 const DEFAULT_DATE_FORMAT: &str = "%Y/%m/%d %H:%M:%S%.3f"; | 16 const DEFAULT_DATE_FORMAT: &str = "%Y-%m-%d %H:%M:%S%.3f"; |
17 | 17 |
18 type DateTime = chrono::DateTime<chrono::Local>; | 18 type DateTime = chrono::DateTime<chrono::Local>; |
19 | 19 |
20 pub struct ProcessStartTime { | 20 pub struct ProcessStartTime { |
21 /// For measuring duration | 21 /// For measuring duration |