From 203ea8443113e309df961c667c376cf3ba5fddb2 Mon Sep 17 00:00:00 2001 From: MuQun Yang Date: Sat, 25 Nov 2000 17:24:42 -0500 Subject: [svn-r3000] Purpose: make mtime test available on windows Description: calculating time zone difference on windows Solution: 1.Use /#if WIN32 #endif/ to make sure the modification will not affect other platforms. 2. use and on NT to obtain time zone difference. Platforms tested: windows 2000 --- src/H5Omtime.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/H5Omtime.c b/src/H5Omtime.c index 6151915..9fa7b51 100644 --- a/src/H5Omtime.c +++ b/src/H5Omtime.c @@ -13,6 +13,11 @@ #include #include +#if defined WIN32 +#include +#include +#endif + #define PABLO_MASK H5O_mtime_mask static void *H5O_mtime_decode(H5F_t *f, const uint8_t *p, H5O_shared_t *sh); @@ -140,6 +145,20 @@ H5O_mtime_decode(H5F_t UNUSED *f, const uint8_t *p, } the_time -= tz.tz_minuteswest*60 - (tm.tm_isdst?3600:0); } +#elif defined WIN32 + { + + struct timeb timebuffer; + char *timeline; + long tz; + ftime( &timebuffer ); + + tz = timebuffer.timezone; + + the_time -=tz*60; + + +} #else /* * The catch-all. If we can't convert a character string universal -- cgit v0.12