On strptime('%X') and Windows, first translate the time picture to a format spec, cf. #437751.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16071 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Andreas Köhler 2007-05-11 20:21:18 +00:00
parent 5237c40147
commit e4b8923fb0

View File

@ -955,23 +955,30 @@ strptime_internal (rp, fmt, tm, decided, era_cnt)
if (*decided != raw)
{
char *locale_string = get_locale_string (LOCALE_STIMEFORMAT);
if (!recursive (locale_string))
char *posix_t_fmt = translate_picture (locale_string);
free (locale_string);
if (!recursive (posix_t_fmt))
{
if (*decided == loc)
return NULL;
{
free (posix_t_fmt);
return NULL;
}
else
rp = rp_backup;
{
rp = rp_backup;
}
}
else
{
free (locale_string);
locale_string = get_locale_string (LOCALE_STIMEFORMAT);
if (strcmp (locale_string, HERE_T_FMT))
if (strcmp (posix_t_fmt, HERE_T_FMT))
*decided = loc;
free (locale_string);
free (posix_t_fmt);
break;
}
free (locale_string);
free (posix_t_fmt);
*decided = raw;
}
#endif