I have this program:
int main()
{
using namespace boost::locale;
generator gen;
std::locale::global(gen(""));
calendar cal("UTC");
calendar cal_local("Europe/Berlin");
date_time dt_utc(std::time(0), cal);
date_time dt_local(std::time(0), cal_local);
std::cerr << "UTC: " << dt_utc.get(period::hour()) << "\n";
std::cerr << "LOCAL: " << dt_local.get(period::hour()) << "\n";
}
It behaves differently on two different but identical systems running Debian Wheezy
with gcc 4.7.2-5
and boost 1.49
. Both the systems have the same locale en_US.UTF-8
.
The above program was executed at around Thu Sep 25 2014 11:15 UTC
.
Output on System A
UTC: 11
LOCAL: 11
Output on System B
UTC: 11
LOCAL: 13
What should cause this?
Note: Currently DST is active for Europe/Berlin
Update:
libboost1.49-dev
on both the systems is installed from a Debian repository as seen here:
user@system_a:~$ apt-cache policy libboost1.49-dev
libboost1.49-dev:
Installed: 1.49.0-3.2
Candidate: 1.49.0-3.2
Version table:
*** 1.49.0-3.2 0
500 http://ftp2.de.debian.org/debian/ wheezy/main amd64 Packages
100 /var/lib/dpkg/status
Also verified that libboost_locale.so
has a dependencies libicuuc.so
, libicui18n.so
and libicudata.so
on both the systems.