Boost logo

Boost Users :

From: Duncan Woods (woods_at_[hidden])
Date: 2004-08-19 15:25:51


Jeff,

It sounds good - best of luck. I shall keep my on eye on future
releases. I hadn't heard of roque wave (costs money though) and never
thought to check IBM.

For anyone interested, having beaten my head against many different
walls and become the trivia king of world-wide DST rules, my quick win32
solution was:

1. Preload the SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time
Zones registry branch into a map
2. Use the win32 SystemTimeToTzSpecificLocalTime for applying a
time-zone to UTC
3. Use the WINE implementation of TzSpecificLocalTimeToSystemTime for
returning to UTC since for win32 it is XP and win2003 Server only.
4. Enable\Disable dst conversion by changing the
TIME_ZONE_INFORMATION::DaylightDate.wMonth to zero

Satisfies a shed load of typical rules but - wow - its horrid!

Thanks,
Duncan

Jeff Garland wrote:

>On Thu, 19 Aug 2004 10:06:57 +0100, Duncan Woods wrote
>
>
>>Jeff,
>>
>>Thanks for your reply. I'm afraid I will have to find another
>>solution short-term but look forward to helping try out some of the
>>
>>
>
>Sorry to hear that.
>
>
>
>>betas in the future. C++ has been aching for a definitive date-time
>>library - what are the current leaders?
>>
>>
>
>Good question, but you know my answer would be biased ;-) As for local time
>support, I don't really know of any libraries that do it really well. IBM has
>some timezone support as do the Roque Wave libraries. Still I don't think
>either use the TZ database or th Posix tz naming. Bottom line here is I'm
>hoping to raise the bar...
>
>
>
>>re: tz database, it would be helpful to support caching the db
>>results in memory to avoid accidental/lazy implementations going to
>>disk each time.
>>
>>
>
>Yes, the plan is to read in from the csv file into memory. User will control
>the lifetime of the object. For the whole world this will amount to a few
>hundred entries in a map. And of course you can edit down the csv file to
>suit your needs.
>
>Jeff
>_______________________________________________
>Boost-users mailing list
>Boost-users_at_[hidden]
>http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>


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