diff options
author | MuQun Yang <ymuqun@hdfgroup.org> | 2000-11-25 22:24:42 (GMT) |
---|---|---|
committer | MuQun Yang <ymuqun@hdfgroup.org> | 2000-11-25 22:24:42 (GMT) |
commit | 203ea8443113e309df961c667c376cf3ba5fddb2 (patch) | |
tree | 7853fa6ce3e306408f87178cd054ec01b0a6fc0d | |
parent | 2e8e3d195b5df8f13ad907ce3cee0f1e7322a0a3 (diff) | |
download | hdf5-203ea8443113e309df961c667c376cf3ba5fddb2.zip hdf5-203ea8443113e309df961c667c376cf3ba5fddb2.tar.gz hdf5-203ea8443113e309df961c667c376cf3ba5fddb2.tar.bz2 |
[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 <sys/types.h> and <sys/timeb.h> on NT to obtain time zone difference.
Platforms tested:
windows 2000
-rw-r--r-- | src/H5Omtime.c | 19 |
1 files changed, 19 insertions, 0 deletions
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 <H5MMprivate.h> #include <H5Oprivate.h> +#if defined WIN32 +#include <sys/types.h> +#include <sys/timeb.h> +#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 |