TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A few weird ways of displaying Git hashes

4 pointsby harporoederalmost 2 years ago

1 comment

cratermoonalmost 2 years ago
Another possibility: timestamps. For convenience, split the 40-character hash into four parts, convert each part into an integer, and use it as a unix millis value. The first hash given in the example, f7f05111ddb22b58fdad8bee63a3cd2bcea43398, becomes<p><pre><code> 2003-09-30 02:26:06.941 1994-04-01 20:17:11.085 1989-01-17 00:26:01.549 1975-12-18 16:01:01.336</code></pre>