Skip to content

Commit

Permalink
Change Exif style date representation to ISO 8601 for logging
Browse files Browse the repository at this point in the history
  • Loading branch information
victoryforce authored and TurboGit committed Jan 21, 2025
1 parent 48be48a commit a8728bb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,15 @@ int main(int argc, char *argv[])
dt_osx_prepare_environment();
#endif
#ifdef _WIN32
// on Windows we have a hard time showing stuff printed to stdout/stderr to the user.
// because of that we write it to a log file.
// On Windows we have a hard time showing stuff printed to stdout/stderr to the user.
// Because of that we write it to a log file.
char datetime[DT_DATETIME_EXIF_LENGTH];
dt_datetime_now_to_exif(datetime);

// Users are more accustomed to the ISO 8601 format than to separating
// the year, month, and day with a colon (which is the Exif convention)
datetime[4] = datetime[7] = '-';

// Make sure to not redirect output when the output is already
// being redirected, either to a file or a pipe.
int out_type = GetFileType(GetStdHandle(STD_OUTPUT_HANDLE));
Expand Down

0 comments on commit a8728bb

Please sign in to comment.