/** Private implementation of GncDateTime. See the documentation for that class. */ static LDT LDT_from_unix_local(const time64 time) { try { PTime temp(unix_epoch.date(), boost::posix_time::hours(time / 3600) + boost::posix_time::seconds(time % 3600)); auto tz = tzp.get(temp.date().year()); return LDT(temp, tz); } catch(boost::gregorian::bad_year) { throw(std::invalid_argument("Time value is outside the supported year range.")); } }
GncDateImpl(): m_greg(unix_epoch.date()) {}
GncDateTimeImpl() : m_time(unix_epoch, tzp.get(unix_epoch.date().year())) {}