How can I convert between local and UTC time (in particular, from local to UTC) using boost::date_time
using a current system timezone? I know about boost::date_time::local_adjustor
, but it requires a template argument which is a timezone-dependent offset.
Failing platform-independent way to do that, how would I do it specifically on Linux?
As an aside, how are non-existent time points handled during the conversion? For example if a day is one hour short due to DST, and I try to convert a time point from the missing hour, what will be the resultant universal time?