Include "config.h" and <time.h>

"config.h" defines the _GNU_SOURCE macro needed to access the
tm_gmtoff and tm_zone members of struct tm in a proper way on
glibc-based systems.