Gitly
Log in
Register
v
/
examples
Raw file
|
12 loc (10 sloc)
|
227 bytes
|
Latest commit hash 017ace6ea
1
import
time
2
import
net.http
3
4
fn
main() {
5
resp := http.get(
'https://vlang.io/utc_now'
)
or
{
6
eprintln(
'Failed to fetch data from the server. Error: ${err}'
)
7
return
8
}
9
10
t := time.unix(resp.body.int())
11
println(t.format())
12
}