ensure only locale-independent format strings are used with strftime

affects filenames of replays and screenshots
This commit is contained in:
Andrei Alexeyev 2017-12-31 10:00:12 +02:00
parent 270a3cb252
commit 14e750fde0
No known key found for this signature in database
GPG key ID: 363707CD4C7FE8A4
2 changed files with 2 additions and 2 deletions

View file

@ -25,7 +25,7 @@ void save_rpy(MenuData *menu, void *a) {
// time when the game was *initiated*
rawtime = (time_t)rpy->stages[0].seed;
timeinfo = localtime(&rawtime);
strftime(strtime, 128, "%Y%m%d_%H-%M-%S_%Z", timeinfo);
strftime(strtime, 128, "%Y%m%d_%H-%M-%S%z", timeinfo);
char prepr[16], drepr[16];
plrmode_repr(prepr, 16, plrmode_find(rpy->stages[0].plr_char, rpy->stages[0].plr_shot));

View file

@ -386,7 +386,7 @@ void video_take_screenshot(void) {
time(&rawtime);
timeinfo = localtime(&rawtime);
strftime(outfile, 128, "taisei_%Y%m%d_%H-%M-%S_%Z.png", timeinfo);
strftime(outfile, 128, "taisei_%Y%m%d_%H-%M-%S%z.png", timeinfo);
outpath = strjoin("storage/screenshots/", outfile, NULL);
syspath = vfs_repr(outpath, true);