From d5aead4b41d2f91171a3227a4e2b00c2f4aa165e Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 9 Dec 2021 14:30:39 -0600 Subject: [PATCH] fix: non-portable strftime format string (#2290) Xref: b61b1e2c1631f32a0372999e13fd366fa54da8dc --- libtransmission/torrent.cc | 2 +- utils/remote.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libtransmission/torrent.cc b/libtransmission/torrent.cc index 7ebb982c4..035e6729c 100644 --- a/libtransmission/torrent.cc +++ b/libtransmission/torrent.cc @@ -1844,7 +1844,7 @@ static void torrentCallScript(tr_torrent const* tor, char const* script) struct tm tm; char ctime_str[32]; tr_localtime_r(&now, &tm); - strftime(ctime_str, sizeof(ctime_str), "%a %b %2e %T %Y%n", &tm); /* ctime equiv */ + strftime(ctime_str, sizeof(ctime_str), "%a %b %d %T %Y%n", &tm); /* ctime equiv */ char* const torrent_dir = tr_sys_path_native_separators(tr_strdup(tor->currentDir)); diff --git a/utils/remote.cc b/utils/remote.cc index 6220b74c9..5e5865440 100644 --- a/utils/remote.cc +++ b/utils/remote.cc @@ -934,7 +934,7 @@ static char* format_date(char* buf, size_t buflen, time_t now) { struct tm tm; tr_localtime_r(&now, &tm); - strftime(buf, buflen, "%a %b %2e %T %Y%n", &tm); /* ctime equiv */ + strftime(buf, buflen, "%a %b %d %T %Y%n", &tm); /* ctime equiv */ return buf; }