Merge pull request #746 from marcelocg/master

Document date command
This commit is contained in:
Jonathan Turner 2019-10-02 04:23:54 +13:00 committed by GitHub
commit c09b4b045f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

34
docs/commands/date.md Normal file
View File

@ -0,0 +1,34 @@
# date
Use `date` to get the current date and time. Defaults to local timezone but you can get it in UTC too.
## Flags
--utc
Returns the current date and time in UTC
--local
Returns the current date and time in your local timezone
## Examples
```shell
> date
━━━━━━┯━━━━━━━┯━━━━━┯━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━
year │ month │ day │ hour │ minute │ second │ timezone
──────┼───────┼─────┼──────┼────────┼────────┼──────────
2019 │ 9 │ 30 │ 21 │ 52 │ 30 │ -03:00
━━━━━━┷━━━━━━━┷━━━━━┷━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━
> date --utc
━━━━━━┯━━━━━━━┯━━━━━┯━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━
year │ month │ day │ hour │ minute │ second │ timezone
──────┼───────┼─────┼──────┼────────┼────────┼──────────
2019 │ 10 │ 1 │ 0 │ 52 │ 32 │ UTC
━━━━━━┷━━━━━━━┷━━━━━┷━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━
> date --local
━━━━━━┯━━━━━━━┯━━━━━┯━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━
year │ month │ day │ hour │ minute │ second │ timezone
──────┼───────┼─────┼──────┼────────┼────────┼──────────
2019 │ 9 │ 30 │ 21 │ 52 │ 34 │ -03:00
━━━━━━┷━━━━━━━┷━━━━━┷━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━
```