mirror of
https://codeberg.org/hyperreal/bin
synced 2024-11-25 10:23:42 +01:00
Add tznu
This commit is contained in:
parent
94cc7edaf4
commit
2148df813e
22
tznu
Executable file
22
tznu
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env nu
|
||||
|
||||
let continent = (
|
||||
ls /usr/share/zoneinfo
|
||||
| where name !~ "posix" and name !~ "right"
|
||||
| where type == dir
|
||||
| get name
|
||||
| path basename
|
||||
| input list $"\n(ansi red)Select a continent:(ansi reset)"
|
||||
)
|
||||
|
||||
let city = (
|
||||
ls ("/usr/share/zoneinfo" | path join $continent)
|
||||
| get name
|
||||
| path basename
|
||||
| input list $"\n(ansi red)Select a city:(ansi reset)"
|
||||
)
|
||||
|
||||
print ""
|
||||
let timezone = ([$continent, "/", $city] | str join)
|
||||
["The time in ", $timezone, " is:"] | str join | print
|
||||
date now | date to-timezone $timezone
|
Loading…
Reference in New Issue
Block a user