diff options
author | Jeff King <peff@peff.net> | 2015-09-04 00:48:59 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-09-04 01:45:26 +0300 |
commit | add00ba2de971e0c5ba00f1f02b73c5534079d2c (patch) | |
tree | 40a05fca8f59a33785ab7156f428f183e7a8ab10 /cache.h | |
parent | dc6d782c5d2526b251061daffc3e74d15c8c7095 (diff) |
date: make "local" orthogonal to date format
Most of our "--date" modes are about the format of the date:
which items we show and in what order. But "--date=local" is
a bit of an oddball. It means "show the date in the normal
format, but using the local timezone". The timezone we use
is orthogonal to the actual format, and there is no reason
we could not have "localized iso8601", etc.
This patch adds a "local" boolean field to "struct
date_mode", and drops the DATE_LOCAL element from the
date_mode_type enum (it's now just DATE_NORMAL plus
local=1). The new feature is accessible to users by adding
"-local" to any date mode (e.g., "iso-local"), and we retain
"local" as an alias for "default-local" for backwards
compatibility.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1110,7 +1110,6 @@ struct date_mode { DATE_NORMAL = 0, DATE_RELATIVE, DATE_SHORT, - DATE_LOCAL, DATE_ISO8601, DATE_ISO8601_STRICT, DATE_RFC2822, @@ -1118,6 +1117,7 @@ struct date_mode { DATE_RAW } type; const char *strftime_fmt; + int local; }; /* |