the global timezone variable is glibc-specific. so use timegm() instead of mktime() for the conversion. as that is specific to the BSDs and glibc, provide a fallback. amends 62a6099.
62a6099
split header and move some code to more logical places.