I will soon have access to a network license for a piece of software that uses the Sentinel Protection Driver (ie. I do not need USB support), so I am looking into implementing ExSystemTimeToLocalTime (Bug 19395) so that the driver will work properly. In the process of researching a good way to support this feature I found that the "broken-down time structure" (struct tm) has a member for the local timezone offset from GMT (tm_gmtoff). According to the man pages this feature requires that _BSD_SOURCE be defined before including time.h; however, I found this member being used in dlls/msvcrt/time.c without this #define. So, the question I have is whether it is OK to use tm_gmtoff in Wine (whether there is a portability concern) and the proper way to include time.h to use this feature.
Erich Hoover ehoover@mines.edu
"Erich Hoover" ehoover@mines.edu wrote:
I will soon have access to a network license for a piece of software that uses the Sentinel Protection Driver (ie. I do not need USB support), so I am looking into implementing ExSystemTimeToLocalTime (Bug 19395) so that the driver will work properly. In the process of researching a good way to support this feature I found that the "broken-down time structure" (struct tm) has a member for the local timezone offset from GMT (tm_gmtoff). According to the man pages this feature requires that _BSD_SOURCE be defined before including time.h; however, I found this member being used in dlls/msvcrt/time.c without this #define. So, the question I have is whether it is OK to use tm_gmtoff in Wine (whether there is a portability concern) and the proper way to include time.h to use this feature.
What's wrong with using SystemTimeToTzSpecificLocalTime() instead of inventing the wheel??
On Sat, Dec 19, 2009 at 11:23 PM, Dmitry Timoshkov dmitry@codeweavers.comwrote:
... What's wrong with using SystemTimeToTzSpecificLocalTime() instead of inventing the wheel??
Because that would be the smart thing to do? I've never had to do any time zone conversion, so I was not aware of this function - thanks!
Erich Hoover ehoover@mines.edu