clock scan: Implement timegm() locally