mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-28 11:31:04 -08:00
docs: time zone example using sprig
This commit is contained in:
parent
e289298e6f
commit
d0fe5b7ade
|
@ -76,5 +76,14 @@ Show the current timestamp.
|
||||||
- StampMicro = "Jan _2 15:04:05.000000"
|
- StampMicro = "Jan _2 15:04:05.000000"
|
||||||
- StampNano = "Jan _2 15:04:05.000000000"
|
- StampNano = "Jan _2 15:04:05.000000000"
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
To display the time in multiple time zones, using [Sprig's Date Functions][sprig-date]:
|
||||||
|
|
||||||
|
```text
|
||||||
|
{{ .CurrentDate | date .Format }} {{ dateInZone "15:04Z" .CurrentDate "UTC" }}
|
||||||
|
```
|
||||||
|
|
||||||
[templates]: /docs/configuration/templates
|
[templates]: /docs/configuration/templates
|
||||||
[format]: https://yourbasic.org/golang/format-parse-string-time-date-example/
|
[format]: https://yourbasic.org/golang/format-parse-string-time-date-example/
|
||||||
|
[sprig-date]: https://masterminds.github.io/sprig/date.html
|
||||||
|
|
Loading…
Reference in a new issue