> On Jul 24, 2015, at 6:09 AM, Robert Fewell <14ubo...@gmail.com> wrote: > > John, > > Still trying to compile with your patch with the following changes for > load_windows_default_tz... > > void > TimeZoneProvider::load_windows_default_tz() > { > TIME_ZONE_INFORMATION tzi {}; > if (GetTimeZoneInformation (&tzi) == TIME_ZONE_ID_INVALID) > throw std::invalid_argument ("No default time zone."); > RegTZI regtzi { tzi.Bias, tzi.StandardBias, tzi.DaylightBias, > tzi.StandardDate, tzi.DaylightDate }; > > time_zone_names names (tzi.StandardName, tzi.StandardName, > tzi.DaylightName, tzi.DaylightName); > > zone_vector.push_back(std::make_pair(0, zone_from_regtzi(regtzi, names))); > } > > and I also added this to hpp file line 63... > > void load_windows_default_tz(void); > > but am getting this error... > > c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.cpp: In member function > 'void TimeZoneProvider::load_windows_default_tz > ()': > c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.cpp:237:98: error: no > matching function for call to 'boost::date_time:: > time_zone_names_base<char>::time_zone_names_base(WCHAR [32], WCHAR [32], > WCHAR [32], WCHAR [32])' > time_zone_names names (tzi.StandardName, tzi.StandardName, > tzi.DaylightName, tzi.DaylightName); > > ^ > c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.cpp:237:98: note: candidates > are: > In file included from > c:/gcdev/boost/include/boost/date_time/local_time/custom_time_zone.hpp:12:0, > from > c:/gcdev/boost/include/boost/date_time/local_time/local_time_types.hpp:18, > from > c:/gcdev/boost/include/boost/date_time/local_time/local_time.hpp:13, > from c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.hpp:34, > from c:/gcdev/gnucash.git/src/libqof/qof/gnc-timezone.cpp:23: > c:/gcdev/boost/include/boost/date_time/time_zone_names.hpp:59:5: note: > boost::date_time::time_zone_names_base<CharT>::ti > me_zone_names_base(const string_type&, const string_type&, const > string_type&, const string_type&) [with CharT = char; b > oost::date_time::time_zone_names_base<CharT>::string_type = > std::basic_string<char>] > time_zone_names_base(const string_type& std_zone_name_str, > ^ > c:/gcdev/boost/include/boost/date_time/time_zone_names.hpp:59:5: note: no > known conversion for argument 1 from 'WCHAR > [32] {aka wchar_t [32]}' to 'const string_type& {aka const > std::basic_string<char>&}' > c:/gcdev/boost/include/boost/date_time/time_zone_names.hpp:53:5: note: > boost::date_time::time_zone_names_base<CharT>::ti > me_zone_names_base() [with CharT = char] > time_zone_names_base() : > ^ > c:/gcdev/boost/include/boost/date_time/time_zone_names.hpp:53:5: note: > candidate expects 0 arguments, 4 provided > c:/gcdev/boost/include/boost/date_time/time_zone_names.hpp:49:9: note: > boost::date_time::time_zone_names_base<char>::tim > e_zone_names_base(const boost::date_time::time_zone_names_base<char>&) > class time_zone_names_base > ^ > c:/gcdev/boost/include/boost/date_time/time_zone_names.hpp:49:9: note: > candidate expects 1 argument, 4 provided > c:/gcdev/boost/include/boost/date_time/time_zone_names.hpp:49:9: note: > boost::date_time::time_zone_names_base<char>::tim > e_zone_names_base(boost::date_time::time_zone_names_base<char>&&) > c:/gcdev/boost/include/boost/date_time/time_zone_names.hpp:49:9: note: > candidate expects 1 argument, 4 provided > At global scope: > cc1plus.exe: error: unrecognized command line option > "-Wno-deprecated-register" [-Werror] > cc1plus.exe: all warnings being treated as errors > > Will ponder further but you may beat me to an answer. >
Robert, Ah, right, tzi.StandardName and tzi.DaylightName are wchar_t[] and boost doesn’t know what to do with them. This revised patch might work. Regards, John Ralls
0001-Windows-Get-default-timezone-if-there-s-no-default-k.patch
Description: Binary data
_______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel