@@ -179,33 +179,20 @@ static void save_image_to_flipper_sd_card(void* model) {
179
179
FuriString * file_name = furi_string_alloc ();
180
180
181
181
// Get the current date and time.
182
-
183
- // Not supported in "Release" F0 build.
184
- // TODO: Remove when DateTime is supported in "Release" F0 build.
185
- // FuriHalRtcDateTime datetime = {0};
186
-
187
- // Only supported in "RC" & "Dev" builds.
188
- // TODO: Uncomment when DateTime is supported in "Release" F0 build.
189
- // DateTime datetime = {0};
190
-
191
- // TODO: Uncomment when DateTime is supported in "Release" F0 build.
192
- // furi_hal_rtc_get_datetime(&datetime);
193
-
194
- // Create the file name using DateTime.
195
- // TODO: Uncomment when DateTime is supported in "Release" F0 build.
196
- // furi_string_printf(
197
- // file_name,
198
- // EXT_PATH("DCIM/%.4d%.2d%.2d-%.2d%.2d%.2d.bmp"),
199
- // datetime.year,
200
- // datetime.month,
201
- // datetime.day,
202
- // datetime.hour,
203
- // datetime.minute,
204
- // datetime.second);
205
-
206
- // Just use a random number for now instead of DateTime.
207
- int random_number = rand ();
208
- furi_string_printf (file_name , EXT_PATH ("DCIM/%d.bmp" ), random_number );
182
+ DateTime datetime = {0 };
183
+
184
+ furi_hal_rtc_get_datetime (& datetime );
185
+
186
+ // Create the file name.
187
+ furi_string_printf (
188
+ file_name ,
189
+ EXT_PATH ("DCIM/%.4d%.2d%.2d-%.2d%.2d%.2d.bmp" ),
190
+ datetime .year ,
191
+ datetime .month ,
192
+ datetime .day ,
193
+ datetime .hour ,
194
+ datetime .minute ,
195
+ datetime .second );
209
196
210
197
// Open the file for writing. If the file does not exist (it shouldn't),
211
198
// create it.
0 commit comments