mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
13 lines
225 B
V
13 lines
225 B
V
import time
|
|
import net.http
|
|
|
|
fn main() {
|
|
resp := http.get('https://vlang.io/utc_now') or {
|
|
eprintln('Failed to fetch data from the server. Error: $err')
|
|
return
|
|
}
|
|
|
|
t := time.unix(resp.text.int())
|
|
println(t.format())
|
|
}
|