Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple timezones in git log #428

Closed
fgrosse opened this issue Jul 30, 2015 · 3 comments
Closed

Multiple timezones in git log #428

fgrosse opened this issue Jul 30, 2015 · 3 comments

Comments

@fgrosse
Copy link

fgrosse commented Jul 30, 2015

When I have a repository where the commit timestamps come from different timezones the git log shown by tig get pretty confusing since it omits the time zones.

Could we somehow unify all show times to the users time zone (git log --date=local) ?

@jonas
Copy link
Owner

jonas commented Sep 13, 2015

set main-view-date = local works similar to git-log's --date=local. There's not currently an option to set all times to the users time zone, so you need to add similar options for the blame and tree view.

@jonas jonas closed this as completed in 7486358 May 20, 2018
rolandwalker pushed a commit to rolandwalker/tig that referenced this issue May 21, 2018
The issues:

 1. timezone information is missing from non-local dates,
    e.g. "2018-04-09 15:15 +0800" is displayed as "2018-04-09 15:15"
         "2018-03-19 04:48 -0700" is displayed as "2018-03-19 04:48"
 2. custom dates are formatting %z as "+0000"

With this change:

 1. Show timezone information by default for non-local dates using the
    format string "%Y-%m-%d %H:%M %z"
 2. display the actual timezone when formatting "%z" instead of "+0000"

[ jf: Updated the tests to match the new date formatting and fixed
  mkdate to replace %z and %Z with the timezone rather than passing it
  to strftime and expecting "+0000", which is not always the case. ]

Closes jonas#811
@eraoul
Copy link

eraoul commented Jul 2, 2024

This is still broken. I just wasted a day debugging something complex because I didn't notice that the one key commit was in a different timezone.

What a joke. Git is so user-hostile, and for some reason people seem to love how terrible it is since it lets them seem smart at work when working around its horrible developer experience.

@PaulChanHK
Copy link
Contributor

PaulChanHK commented Nov 26, 2024

It can work both ways:

  1. run command "set main-view-date-local = yes" inside tig (enter it after pressing colon key)
  2. put that line into ~/.tigrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants