setlocale() is not threadsafe except when used only to query the locale
without changing it. Let's use uselocale() instead, which changes the
locale only on the calling thread. Much better.
Hong Kong people expect to use a little endian date in English. (and a
big endian date in Chinese)
The D_FMT format string for en_HK is '%A, %B %d, %Y', which the current
code parses as middle endian.
This commit makes the code parse it as little endian, that is it doesn't
ignore the %A formatter any more.
en_HK is the only UTF-8 locale with this D_FMT format string, so this
shouldn't change anything for other locales.
https://bugzilla.gnome.org/show_bug.cgi?id=750781