Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
Add seconds to filename timestamps (#517)
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-JL committed Jan 24, 2024
1 parent 411a65a commit 461026e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/toolbox/name_generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,24 +100,26 @@ void name_generator_make_detailed(char* name, size_t max_name_size, const char*
snprintf(
name,
max_name_size,
"%.4d-%.2d-%.2d_%.2d,%.2d_%s",
"%.4d-%.2d-%.2d_%.2d,%.2d,%.2d_%s",
dateTime.year,
dateTime.month,
dateTime.day,
dateTime.hour,
dateTime.minute,
dateTime.second,
prefix);
} else {
snprintf(
name,
max_name_size,
"%s_%.4d-%.2d-%.2d_%.2d,%.2d",
"%s_%.4d-%.2d-%.2d_%.2d,%.2d,%.2d",
prefix,
dateTime.year,
dateTime.month,
dateTime.day,
dateTime.hour,
dateTime.minute);
dateTime.minute,
dateTime.second);
}

// Set first symbol to upper case
Expand Down

0 comments on commit 461026e

Please sign in to comment.