468
468
* pg_strftime(), which isn't locale-aware and does not need to be replaced.
471
strftime_win32(char *dst, size_t dstlen, const wchar_t *format, const struct tm *tm)
471
strftime_win32(char *dst, size_t dstlen, const wchar_t *format, const struct tm * tm)
477
477
encoding = GetDatabaseEncoding();
479
479
len = wcsftime(wbuf, MAX_L10N_DATA, format, tm);
484
488
len = WideCharToMultiByte(CP_UTF8, 0, wbuf, len, dst, dstlen, NULL, NULL);
492
char *convstr = pg_do_encoding_conversion(dst, len, PG_UTF8, encoding);
496
char *convstr = pg_do_encoding_conversion(dst, len, PG_UTF8, encoding);
495
500
strlcpy(dst, convstr, dstlen);