another attempt at sorting this gmtime_r issue