git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 0/6] Make "local" orthogonal to date format

From
John Keeping <john@keeping.me.uk>
Date
Sep 2, 2015, 19:49 UTC
Message-ID
<20150902194946.GL30659@serenity.lan>
In-Reply-To
<xmqq4mjcq2ac.fsf@gitster.mtv.corp.google.com>
On Wed, Sep 02, 2015 at 08:16:59AM -0700, Junio C Hamano wrote:
Show 32 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > On Wed, Sep 02, 2015 at 08:48:26AM +0100, John Keeping wrote:
> >
> >> On Tue, Sep 01, 2015 at 06:44:31PM -0400, Jeff King wrote:
> >> > [1] I do think the error message for "relative-local is nonsense" could
> >> >     perhaps be more explanatory, but I couldn't come up with any better
> >> >     wording. But if you have ideas, feel free to switch it.
> >> 
> >> My only suggestion would be to reuse the "unknown date format: %s"
> >> message and avoid having a special message in this case.
> >
> > Heh, that was what I was trying to avoid. I wanted to avoid "I do not
> > understand our request" and have it more like "I understand what you're
> > _trying_ to do, but it doesn't make sense".
> >
> > I guess "relative dates do not depend on timezones, so -local is
> > meaningless" would be the closest thing.
> >
> > I don't think it is that big a deal whichever way we go, though.
> 
> I somehow thought that the discussion was about raw-local, not
> relative-local, but anyway, I think it would make more sense to
> allow both of them.  If you define the meaning of "-local" as:
> 
>     Pretend that the event in question was recorded with your
>     timezone, and show the timestamp using the specified format sans
>     -local suffix.
> 
> that explains what happens for all the other formats well, and it
> also makes sense for what would happen to raw and even relative, I
> think.

The discussion about "raw-local" was in a separate subthread, I think we're just bikeshedding the particular error message here.

OTOH, I don't think there's any disagreement about what "relative-local" and "raw-local" would output were they supported, just whether they are useful. There doesn't seem to be any harm in supporting them; "relative-local" will be identical to "relative" and "raw-local" will require preparatory code movement for the raw output.

Previous: Junio C HamanoNext: Junio C Hamano
Message 36 of 59 in “date: allow any format to display local time”
  1. date: allow any format to display local timeJohn Keeping, Aug 30, 2015
  2. Junio C HamanoAug 31, 2015
  3. Jeff KingAug 31, 2015
  4. Jeff KingAug 31, 2015
  5. Junio C HamanoAug 31, 2015
  6. John KeepingAug 31, 2015
  7. Jeff KingAug 31, 2015
  8. 1/2 fast-import: switch crash-report date to iso8601Jeff King, Aug 31, 2015
  9. 2/2 date: make "local" orthogonal to date formatJeff King, Aug 31, 2015
  10. John KeepingAug 31, 2015
  11. Jeff KingAug 31, 2015
  12. Jeff KingAug 31, 2015
  13. John KeepingSep 1, 2015
  14. 0/6 Make "local" orthogonal to date formatJohn Keeping, Sep 1, 2015
  15. 1/6 fast-import: switch crash-report date to iso8601John Keeping, Sep 1, 2015
  16. 2/6 date: make "local" orthogonal to date formatJohn Keeping, Sep 1, 2015
  17. Junio C HamanoSep 1, 2015
  18. Jeff KingSep 1, 2015
  19. John KeepingSep 1, 2015
  20. Jeff KingSep 1, 2015
  21. Junio C HamanoSep 1, 2015
  22. Junio C HamanoSep 2, 2015
  23. 3/6 t6300: introduce test_date() helperJohn Keeping, Sep 1, 2015
  24. Junio C HamanoSep 1, 2015
  25. Eric SunshineSep 1, 2015
  26. Jeff KingSep 1, 2015
  27. John KeepingSep 1, 2015
  28. Jeff KingSep 1, 2015
  29. 4/6 t6300: make UTC and local dates differentJohn Keeping, Sep 1, 2015
  30. 5/6 t6300: add test for "raw" date formatJohn Keeping, Sep 1, 2015
  31. 6/6 t6300: add tests for "-local" date formatsJohn Keeping, Sep 1, 2015
  32. Jeff KingSep 1, 2015
  33. John KeepingSep 2, 2015
  34. Jeff KingSep 2, 2015
  35. Junio C HamanoSep 2, 2015
  36. John KeepingSep 2, 2015
  37. Junio C HamanoSep 2, 2015
  38. John KeepingSep 2, 2015
  39. Junio C HamanoSep 2, 2015
  40. Jeff KingSep 2, 2015
  41. 00/11 Make "local" orthogonal to date formatJohn Keeping, Sep 3, 2015
  42. 01/11 Documentation/blame-options: don't list date formatsJohn Keeping, Sep 3, 2015
  43. 02/11 Documentation/config: don't list date formatsJohn Keeping, Sep 3, 2015
  44. 03/11 Documentation/git-for-each-ref: don't list date formatsJohn Keeping, Sep 3, 2015
  45. 04/11 Documentation/rev-list: don't list date formatsJohn Keeping, Sep 3, 2015
  46. Junio C HamanoSep 3, 2015
  47. 05/11 fast-import: switch crash-report date to iso8601John Keeping, Sep 3, 2015
  48. 06/11 t6300: introduce test_date() helperJohn Keeping, Sep 3, 2015
  49. 07/11 t6300: add test for "raw" date formatJohn Keeping, Sep 3, 2015
  50. 08/11 date: check for "local" before anything elseJohn Keeping, Sep 3, 2015
  51. Junio C HamanoSep 3, 2015
  52. 09/11 date: make "local" orthogonal to date formatJohn Keeping, Sep 3, 2015
  53. 10/11 t6300: make UTC and local dates differentJohn Keeping, Sep 3, 2015
  54. 11/11 t6300: add tests for "-local" date formatsJohn Keeping, Sep 3, 2015
  55. Jeff KingSep 8, 2015
  56. Junio C HamanoSep 2, 2015
  57. Jeff KingSep 2, 2015
  58. John KeepingSep 2, 2015
  59. Junio C HamanoSep 3, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.