wtv: Check the return value from gmtime