date -u gives date and time in GMT format
date gives date and time in local timezone
date +%s gives local time in epoch time
Is there a way to get GMT time in epoch format?
In the AIX I'm using, there are only -n and -u options available (so I'm unable to use -f option).
My aim is to calculate Offset in hours between localtime and GMT.
I can parse
$TZ environment variable which can be tedious. Instead divide epoch time difference between two timezones by 60 should approximately give me the answer.