• Jeff King's avatar
    date: make "local" orthogonal to date format · add00ba2
    Jeff King authored
    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
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: John Keeping's avatarJohn Keeping <john@keeping.me.uk>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
date.c 26.9 KB