time.h and xtensa toolchain
Posted: Mon Mar 02, 2020 9:51 pm
I am trying to get current time of my system (debian) to set it to an rtc with esp32.
i used code:
And i am always getting 1970 1st of January.
I also tried another eclipse that has nothing to do with esp32, so it is a normal C/C++ eclipse and created a cmake program normally. The same code where toolchain was the default from user/bin/gcc worked properly. is there something that i can do to the idf project so time.h can work?
i used code:
- time_t currentTime;
- time(¤tTime);
- printf("%s",ctime(¤tTime));
I also tried another eclipse that has nothing to do with esp32, so it is a normal C/C++ eclipse and created a cmake program normally. The same code where toolchain was the default from user/bin/gcc worked properly. is there something that i can do to the idf project so time.h can work?