Sketch with RTC and Data Logger works with Arduino IDE but not when just powered

jparkerri:
I have a sketch for my Uno where I get the RTC time from the Data Logger shield and write it to the SD card. When plugged into my computer running the Arduino IDE and compile/upload (but no serial monitor), it all works fine but when I just power it up with the USB but no uploading from the IDE or with a power supply, I don't get the RTC. Is the IDE providing the date/time or somehow getting the RTC when compiling.uploading?

Another question is how I get the files saved on the SD to get today's date? They all say "1/1/2000". The SD is formatted FAT32. I open and close the file and then open again but it didn't help.

You will have to provide the date to the SDfat.h library.

This thread talks about it.

Chuck.