mkdir

bmartin0
Posts: 33
Joined: Tue Aug 03, 2021 10:38 pm

mkdir

Postby bmartin0 » Thu Apr 14, 2022 4:39 pm

Hi,
I'm trying to create a folder on an sd card. When I used the following mkdir("/sdcard/sysdl") I get a folder that is created on the sd card named sysdl. I've noticed that, when looking at the sd card in windows explorer, the date on the folder is 12/31/1979 at 11:00 pm.
Does anyone know of a method to put the current date using mkdir? I have an RTC on my board so I can provide the date/time in any format required, just don't know how to modify mkdir call appropriately.
Thanks,

ESP_Sprite
Posts: 9757
Joined: Thu Nov 26, 2015 4:08 am

Re: mkdir

Postby ESP_Sprite » Fri Apr 15, 2022 2:11 am

I think those calls use the system time... if you have a RTC, you can probably use the settimeofday() call to inform ESP-IDF of the correct date and time.

bmartin0
Posts: 33
Joined: Tue Aug 03, 2021 10:38 pm

Re: mkdir

Postby bmartin0 » Fri Apr 15, 2022 9:33 am

Thanks, I'll take a look at settimeofday() and see what I can do.

Who is online

Users browsing this forum: Bing [Bot] and 440 guests