Missing functions in date_time library

I am using the boost date_time library and noticed that there is a from_ftime() function to convert a FILETIME into a ptime, but I could not find the reverse operation to_ftime(). Am I missing it somewhere? Likewise, I am using the c_local_adjustor::utc_to_local() function and cannot find the corresponding local_to_utc() function in c_local_adjustor. Thanks, Sean

On Fri, 22 Jul 2005 18:09:10 -0600, Sean Rohead wrote
I am using the boost date_time library and noticed that there is a from_ftime() function to convert a FILETIME into a ptime, but I could not find the reverse operation to_ftime(). Am I missing it somewhere?
No. FILETIME, as you're certainly aware, is a Windows only way to measure time. This function is there primarily to support conversion from legacy applications. If there's really some need it's not hard to support.
Likewise, I am using the c_local_adjustor::utc_to_local() function and cannot find the corresponding local_to_utc() function in c_local_adjustor.
In 1.33 there is vastly enhanced support for local time conversion via the timezone class and it's friends posix_timezone and tz_database. See http://engineering.meta-comm.com/resources/cs-win32_metacomm/doc/html/date_t... for more on this. If you still want to use the compile time approach supported in 1.32, have a look at libs/date_time/test/posix_time/testlocal_adjustor.cpp. There's code in there that show how to convert back and forth. Jeff
participants (2)
-
Jeff Garland
-
Sean Rohead