4 ms·
For years I've had `gc` in my terminal mapped to `TZ=UTC0 git commit` for exactly this reason. No need to change system times or git settings. (though perhaps a
by BluSyn 3y ago
For years I've had `gc` in my terminal mapped to `TZ=UTC0 git commit` for exactly this reason. No need to change system times or git settings. (though perhaps a better way in global config?)
It's not even for nefarious reasons. I travel a lot, and don't like leaking my travel itinerary on public repos.
- nerdponx 3y agoHow about this? alias git='TZ=UTC0 git'
- deleted 3y ago[deleted]
- yanateras 3y agoEven without the zero! alias git='TZ=UTC git'
- sneak 3y agoI travel a lot but never change my workstation’s time zone out of PST/PDT these days. That would be a manual step and I don’t use Location Services.
- akira2501 3y agoTime zone is purely a displayed time consideration. I'm not bothered that the display time on my computer is different from the time zone I'm actually in.
- kelnos 3y agoSame. My phone automatically changes, and I'll manually change my watch, but when I travel, I leave my laptop in my home time zone. Part of it is I just can't be bothered, and part of it is I want an easy way to know what time it is at home without having to fiddle with a world clock.
- SmartHypercube 3y agoI have been using a small tool I made to hide the time information in my git commits: https://github.com/SmartHypercube/git-date-truncate https://github.com/SmartHypercube/git-date-truncate It not only sets the timezone to UTC, but also sets the time to 00:00. So my commits will only have date information. I think only saving the date permanently in the git commit is good enough. No need to leak the precise time I made commits.