gnucash stable: GncDateTime: New exceptions and a 32-bit time_t problem.

John Ralls jralls at code.gnucash.org
Sun Dec 28 19:01:02 EST 2025


Updated	 via  https://github.com/Gnucash/gnucash/commit/942313d0 (commit)
	from  https://github.com/Gnucash/gnucash/commit/1c9bcf62 (commit)



commit 942313d09969b829fb43cda01154b3637aad3060
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Dec 28 15:42:06 2025 -0800

    GncDateTime: New exceptions and a 32-bit time_t problem.
    
    Boost::date_time has changed to throwing a std::out_of_range instead of a
    boost::date_time::gregorian::bad_year when a date is outside of the
    1400-9999 year range it can deal with.
    
    We also recently discovered that it will use the system localtime function
    when creating a new date which can lead to a 2038 failure. Use std::chrono
    to resolve that problem.



Summary of changes:
 libgnucash/engine/gnc-datetime.cpp | 23 ++++++++++++++++++++++-
 libgnucash/engine/gnc-timezone.cpp |  3 +++
 2 files changed, 25 insertions(+), 1 deletion(-)



More information about the gnucash-patches mailing list