I never tried to code that, but seems simply to subtract 8 hours from (your location) GMT before you transfer to RTC.