mirror of
https://github.com/vlang/v.git
synced 2025-08-04 02:07:28 -04:00
14 lines
220 B
V
14 lines
220 B
V
import time
|
|
import net.http
|
|
|
|
fn main() {
|
|
resp := http.get('https://vlang.io/utc_now') or {
|
|
println('failed to fetch data from the server')
|
|
return
|
|
}
|
|
|
|
t := time.unix(resp.text.int())
|
|
println(t.format())
|
|
}
|
|
|