Merge branch 'maint'

Conflicts:
	src/io.c
	src/notify.c
	src/utils.c
This commit is contained in:
Lukas Fleischer
2012-05-23 22:23:07 +02:00
3 changed files with 10 additions and 3 deletions

View File

@@ -386,8 +386,15 @@ char *date_sec2date_str(long sec, const char *datefmt)
/* Generic function to format date. */
void date_sec2date_fmt(long sec, const char *fmt, char *datef)
{
struct tm *lt = localtime((time_t *) & sec);
/* TODO: Find a better way to deal with localization and strftime(). */
char *locale_old = mem_strdup (setlocale (LC_ALL, NULL));
setlocale (LC_ALL, "C");
struct tm *lt = localtime((time_t *)&sec);
strftime(datef, BUFSIZ, fmt, lt);
setlocale (LC_ALL, locale_old);
mem_free (locale_old);
}
/*