This commit is contained in:
David Philippi 2006-06-28 18:13:47 +00:00
parent ce095b765e
commit db972f195d

View file

@ -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