Skip to content

Commit

Permalink
Merge pull request cheat#33 from 8go/patch-1
Browse files Browse the repository at this point in the history
date: added tags and examples
  • Loading branch information
chrisallenlane authored Aug 23, 2020
2 parents dc27892 + 4923351 commit 4ee5882
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions date
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
tags: [ date, time ]
---
# To print the date in a format suitable for affixing to file names:
date +"%Y%m%d_%H%M%S"

Expand All @@ -6,3 +9,9 @@ date -d @1440359821

# To convert a Unix timestamp to Date (OSX)
date -r 1440359821

# To list UTC time
date -u

# Show the time on the west coast of the US (use tzselect(1) to find TZ)
TZ='America/Los_Angeles' date

0 comments on commit 4ee5882

Please sign in to comment.