our/cmds/timefor

7 lines
152 B
Plaintext
Raw Normal View History

2022-08-24 02:40:36 +00:00
#!/usr/bin/env bash
echo $2
ip=$(finger $1 | egrep -o -m 1 '([0-9]{1,3}\.){3}[0-9]{1,3}')
tz=$(curl -s "https://ipapi.co/$ip/timezone")
TZ=$tz date -R