Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
603 views
in Technique[技术] by (71.8m points)

git: timezone and timestamp format

From git I can get the timestamp:

"2011-10-04 12:58:36 -0600"

but is there any way to show it as:

"2011-10-04 06:58:36"

So all I want is to get rid of the -0600 timezone offset. How can I do this? Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If you ask about git log, you can try and select most correct form from:

git log --date={relative,local,default,iso,rfc}

--date=local seems to be the best candidate.

To make this permanent, use git config --global log.date local.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...