Dmitry Timoshkov : ntdll: Add some traces to make debugging time zone related problems easier.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 30 08:55:46 CDT 2007


Module: wine
Branch: master
Commit: a188662ea8412b7c98a0efff3d9b4c77fd6fcfdb
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a188662ea8412b7c98a0efff3d9b4c77fd6fcfdb

Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date:   Sun Jul 29 21:31:00 2007 +0900

ntdll: Add some traces to make debugging time zone related problems easier.

---

 dlls/ntdll/time.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/dlls/ntdll/time.c b/dlls/ntdll/time.c
index 256be42..b49d80c 100644
--- a/dlls/ntdll/time.c
+++ b/dlls/ntdll/time.c
@@ -27,6 +27,7 @@
 
 #include <stdarg.h>
 #include <stdlib.h>
+#include <errno.h>
 #include <string.h>
 #include <limits.h>
 #include <time.h>
@@ -881,7 +882,10 @@ static const WCHAR* TIME_GetTZAsStr (time_t utc, int bias, int dst)
    unsigned int i;
 
    if (!strftime (psTZName, 7, "%Z", ptm))
-      return (NULL);
+   {
+      WARN("strftime error %d\n", errno);
+      return NULL;
+   }
 
    for (i=0; i<(sizeof(TZ_INFO) / sizeof(struct tagTZ_INFO)); i++)
    {
@@ -975,10 +979,13 @@ NTSTATUS WINAPI RtlQueryTimeZoneInformation(RTL_TIME_ZONE_INFORMATION *tzinfo)
 
     memset(tzinfo, 0, sizeof(RTL_TIME_ZONE_INFORMATION));
 
-    if( !TIME_GetTimeZoneInfoFromReg(tzinfo)) {
+    if( !TIME_GetTimeZoneInfoFromReg(tzinfo))
+    {
+        WARN("TIME_GetTimeZoneInfoFromReg failed\n");
 
         gmt = time(NULL);
         bias = TIME_GetBias(gmt, &daylight);
+        TRACE("bias %d, daylight %d\n", -bias/60, daylight);
 
         tzinfo->Bias = -bias / 60;
         tzinfo->StandardBias = 0;




More information about the wine-cvs mailing list