Well, you're welcome ... I hope I can be of some assistance.
It sure does appear as if the system you are working on has the wrong time. [man]date/man, to the best of my knowledge, is actually returning an Alaskan TZ on this side of the IDL (- 0800) instead of Hong Kong time on that side (+ 0800).
So, [man]gmdate/man is actually behaving correctly. Your system has been "rigged" to appear as if the local time is correct, but I'd guess that it really isn't.... 🙁
If you can get my script to output the correct local time with "+ 0800" from date(), then gmdate() should also be correct. What (operating) system is it?