nushell/docs/commands/date.md
2019-10-01 11:21:56 -03:00

2.2 KiB

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

> date
━━━━━━┯━━━━━━━┯━━━━━┯━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━
 year │ month │ day │ hour │ minute │ second │ timezone
──────┼───────┼─────┼──────┼────────┼────────┼──────────
 2019930215230 │ -03:00
━━━━━━┷━━━━━━━┷━━━━━┷━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━
> date --utc
━━━━━━┯━━━━━━━┯━━━━━┯━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━
 year │ month │ day │ hour │ minute │ second │ timezone
──────┼───────┼─────┼──────┼────────┼────────┼──────────
 201910105232 │ UTC
━━━━━━┷━━━━━━━┷━━━━━┷━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━
> date --local
━━━━━━┯━━━━━━━┯━━━━━┯━━━━━━┯━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━
 year │ month │ day │ hour │ minute │ second │ timezone
──────┼───────┼─────┼──────┼────────┼────────┼──────────
 2019930215234 │ -03:00
━━━━━━┷━━━━━━━┷━━━━━┷━━━━━━┷━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━