gnucash maint: Bug 797067 - Date displayed incorrectly in register take two.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

gnucash maint: Bug 797067 - Date displayed incorrectly in register take two.

John Ralls-4
Updated via  https://github.com/Gnucash/gnucash/commit/7d7da8e2 (commit)
        from  https://github.com/Gnucash/gnucash/commit/67dbfca0 (commit)



commit 7d7da8e2c44d117e3124a671e02b9d7f248d4d92
Author: John Ralls <[hidden email]>
Date:   Fri Feb 8 11:40:21 2019 -0800

    Bug 797067 - Date displayed incorrectly in register take two.
   
    Revert using boost::locale to generate std::locales as boost::locale-
    generated locales don't implement std::locale::facet and there was
    a bug in the boost::locale ICU wrapper code that caused the wrong year
    to be output for the last 3 days of December.
   
    GCC's libstdc++ supports only the "C" locale on Windows and throws if
    one attempts to create any other kind. For dates we work around this
    by using wstrftime() to format according to locale and then convert
    the UTF16 string to UTF8. wstrftime() interprets the time zone flags
    %z, %Z, and %ZP differently so we process those first before calling
    strftime. This will have the unfortunate effect of not localizing
    timezone names but it's as close as we can get.



Summary of changes:
 libgnucash/core-utils/gnc-locale-utils.cpp    | 32 ++++-----
 libgnucash/engine/gnc-datetime.cpp            | 99 ++++++++++++++++++++++++---
 libgnucash/engine/test/gtest-gnc-datetime.cpp |  6 +-
 3 files changed, 108 insertions(+), 29 deletions(-)

_______________________________________________
gnucash-patches mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-patches