When playing Solaris10 with a non-GMT environment, I get the following:
# date Fri Jul 26 13:09:38 CEST 2013 (OK) # (TZ=CEST+24 date) Thu Jul 25 11:09:38 CEST 2013 (ERR) # (TZ=GMT+24 date) Thu Jul 25 11:09:38 GMT 2013 (OK) # (TZ=CEST+$((24-$((`date "+%H"`-`date -u "+%H"`)))) date) Thu Jul 25 13:09:38 CEST 2013 (OK)
As you can see, I have, and I want to get CEST, but TZ = CEST + 24 gives me the wrong CEST data; GMT + 24 gives me the correct data, but not applicable.
To get the correct result, I have to use GMT + 22 (the wrong command, the correct result) or CEST + 22 (the wrong value, but the final result is correct for the correct TZ)
source share