Skip to content

Commit c09b4b0

Browse files
author
Jonathan Turner
authored
Merge pull request nushell#746 from marcelocg/master
Document date command
2 parents bbb4cc7 + 94744c6 commit c09b4b0

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

docs/commands/date.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# date
2+
3+
Use `date` to get the current date and time. Defaults to local timezone but you can get it in UTC too.
4+
5+
## Flags
6+
7+
--utc
8+
Returns the current date and time in UTC
9+
10+
--local
11+
Returns the current date and time in your local timezone
12+
13+
## Examples
14+
15+
```shell
16+
> date
17+
━━━━━━┯━━━━━━━┯━━━━━┯━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━
18+
year │ month │ day │ hour │ minute │ second │ timezone
19+
──────┼───────┼─────┼──────┼────────┼────────┼──────────
20+
2019 │ 9 │ 30 │ 21 │ 52 │ 30 │ -03:00
21+
━━━━━━┷━━━━━━━┷━━━━━┷━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━
22+
> date --utc
23+
━━━━━━┯━━━━━━━┯━━━━━┯━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━
24+
year │ month │ day │ hour │ minute │ second │ timezone
25+
──────┼───────┼─────┼──────┼────────┼────────┼──────────
26+
2019 │ 10 │ 1 │ 0 │ 52 │ 32 │ UTC
27+
━━━━━━┷━━━━━━━┷━━━━━┷━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━
28+
> date --local
29+
━━━━━━┯━━━━━━━┯━━━━━┯━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━
30+
year │ month │ day │ hour │ minute │ second │ timezone
31+
──────┼───────┼─────┼──────┼────────┼────────┼──────────
32+
2019 │ 9 │ 30 │ 21 │ 52 │ 34 │ -03:00
33+
━━━━━━┷━━━━━━━┷━━━━━┷━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━
34+
```

0 commit comments

Comments
 (0)