Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- for tz in $(timedatectl list-timezones | grep -v 'UTC')
- do
- gmtoff=$(zdump -v "$tz" | grep 'gmtoff' | tail -n1 | grep -oE "[^ ]+$")
- tz_offset="${gmtoff:7}"
- if [[ "${gmtoff:0:7}" == "gmtoff=" ]]; then
- echo "$tz;$tz_offset"
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement