I have a client java library that parses ISO timestamp with timezone using joda-time library and returns a long value (milliseconds since epoch in UTC). I need to develop a server-side framework (in C++) that will use milliseconds since epoch and generate timestamp in any given timezone (e.g. "Europe/Zurich"). I can use local_date_time option like this :
posix_time ptime = epoch(date(1970,1,1)) + ms; //ms sent from client
tz_database tz;
tz.load_from_file(/*path to date_time_zonespec.csv*/);
time_zone_ptr ptr = tz.time_zone_from_region(regionStr); //regionStr = Europe/Zurich
local_date_time mytime(ptime, ptr);
However, I learnt from this post ( C++: Will you choose boost::date_time or icu::date/time library?) that boost::date_time time zone support is broken. A better option is boost::locale. Is there a way to the same steps as above using boost::locale? I was searching for examples online with boost::Locale but could not find any example similar to what I want.