Boost :: locale behaves differently on two separate but identical systems

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 systems have the same language en_US.UTF-8

.

The above program was executed in approximately Thu Sep 25 2014 11:15 UTC

.

Withdrawal in system A

UTC: 11
LOCAL: 11

      

Withdrawal in system B

UTC: 11
LOCAL: 13

      

What should be causing this?

Note: DST is currently active for Europe and Berlin


Update:

libboost1.49-dev

installed on both systems from the Debian repository, as shown 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 check that libboost_locale.so

has dependencies libicuuc.so

, libicui18n.so

and libicudata.so

from both systems.

+3


source to share





All Articles