is an unsigned long and can't be passed directly to localtime which takes a time_t. From Hannes Wenzel.