Movement related to temperature

Please post the code which is giving the errors, and post the complete error message.

But my problem is with logging the data not the clock.

Please explain more. Are you using OpenLog, or the SD card module with SPI which use SD.h or SdFat.h?