fix for bug #4276
This commit is contained in:
parent
ce095b765e
commit
db972f195d
1 changed files with 6 additions and 0 deletions
|
@ -47,6 +47,7 @@
|
|||
#define LOG_DP LOG_STREAM(info, display)
|
||||
#define ERR_G LOG_STREAM(err, general)
|
||||
|
||||
|
||||
namespace dialogs
|
||||
{
|
||||
|
||||
|
@ -360,12 +361,17 @@ void save_preview_pane::draw_contents()
|
|||
SDL_BlitSurface(map_surf,NULL,screen,&map_rect);
|
||||
}
|
||||
|
||||
char* old_locale= setlocale(LC_TIME, get_locale().localename.c_str());
|
||||
char time_buf[256];
|
||||
const size_t res = strftime(time_buf,sizeof(time_buf),_("%a %b %d %H:%M %Y"),localtime(&((*info_)[index_].time_modified)));
|
||||
if(res == 0) {
|
||||
time_buf[0] = 0;
|
||||
}
|
||||
|
||||
if(old_locale) {
|
||||
setlocale(LC_TIME, old_locale);
|
||||
}
|
||||
|
||||
std::stringstream str;
|
||||
|
||||
// escape all special characters in filenames
|
||||
|
|
Loading…
Add table
Reference in a new issue