diff options
-rw-r--r-- | FICS/gamedb.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/FICS/gamedb.c b/FICS/gamedb.c index db99f14..15fe9ce 100644 --- a/FICS/gamedb.c +++ b/FICS/gamedb.c @@ -652,8 +652,12 @@ movesToString(int g, int pgn) mstrlcat(gameString, tmp, sizeof gameString); mstrlcat(gameString, "--- ", sizeof gameString); - mstrlcat(gameString, (char *) (localtime(&curTime)), - sizeof gameString); // XXX + + if ((tm_ptr = localtime(&curTime)) != NULL) { + strftime(tmp, sizeof tmp, "%Y.%m.%d %H:%M:%S", tm_ptr); + mstrlcat(gameString, tmp, sizeof gameString); + } else + warn("%s: localtime", __func__); if (garray[g].rated) { mstrlcat(gameString, "\nRated ", sizeof gameString); |