]> mj.ucw.cz Git - pciutils.git/commitdiff
pcilmr: Avoid strftime with %F and produce proper ISO 8601 time
authorMartin Mares <mj@ucw.cz>
Sun, 18 Feb 2024 11:09:19 +0000 (12:09 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 18 Feb 2024 11:09:19 +0000 (12:09 +0100)
%F is not portable.

lmr/margin_results.c

index 6d6ed29cd193f8693a88df5a1138e363a0dda086..4d28f041a4c1643ed9ea21e0305d4fb533bfac8b 100644 (file)
@@ -177,7 +177,7 @@ margin_results_save_csv(struct margin_results *results, u8 recvs_n, char *dir,
 {
   char timestamp[64];
   time_t tim = time(NULL);
 {
   char timestamp[64];
   time_t tim = time(NULL);
-  strftime(timestamp, sizeof(timestamp), "%FT%H.%M.%S", gmtime(&tim));
+  strftime(timestamp, sizeof(timestamp), "%Y-%m-%dT%H:%M:%S", gmtime(&tim));
 
   size_t pathlen = strlen(dir) + 128;
   char *path = xmalloc(pathlen);
 
   size_t pathlen = strlen(dir) + 128;
   char *path = xmalloc(pathlen);