On 07/06/2024 18:40, Junio C Hamano wrote:
"darcy via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:
>
+/* timestamp of 2099-12-31T23:59:59Z, including 32 leap days */
+static const time_t timestamp_max = ((2100L - 1970) * 365 + 32) * 24 * 60 * 60 - 1;
I wonder if this should be of timestamp_t type instead, as the check
is done against *timestamp in parse_date_basic() where *timestamp is
of type timestamp_t to match?
I think that would make sense. We'd want to cast one of the numbers to
timestamp_t to ensure that sum uses a wide enough integer as well. Using
2100L is probably OK but an explicit cast would be clearer I think.
Best Wishes
Phillip