|
Boost Users : |
Subject: [Boost-users] posix_time_zone::calc_zone probably buggy
From: Sorin Manolache (sorinm_at_[hidden])
Date: 2009-11-20 10:35:19
Hello,
The Posix specification says that the offset in the TZ variable gives the time
to add to the local time in order to get UTC. Thus, western hemisphere zones
have positive offsets and eastern hemisphere zones have negative offsets.
time_zone_base::base_utc_offset gives the offset of the timezone from UTC. Thus,
western hemisphere zones have negative base_utc_offset_ and eastern hemisphere
zones have positive base_utc_offset_.
Posix specifies that the offset specified in TZ must be added to the localtime
in order to obtain UTC. base_utc_offset_ must be added to UTC in order to obtain
local times. Thus, base_utc_offset_ must be minus the TZ offset.
So I think a minus should be added in front of
date_time::str_from_delimited_time_duration<time_duration_type,char_type>
in the calc_zone method of date_time/local_time/posix_time_zone.hpp.
Regards,
Sorin
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net