Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



I have been using a small tool I made to hide the time information in my git commits: 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.


How about this?

  alias git='TZ=UTC0 git'


Even without the zero!

  alias git='TZ=UTC git'


I 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.


Same. 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.


Time 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: