diff options
Diffstat (limited to 'src/H5Omtime.c')
-rw-r--r-- | src/H5Omtime.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/src/H5Omtime.c b/src/H5Omtime.c index 316ce38..2069a59 100644 --- a/src/H5Omtime.c +++ b/src/H5Omtime.c @@ -129,35 +129,33 @@ H5O_mtime_decode(H5F_t UNUSED *f, const uint8_t *p, #elif defined(H5_HAVE_BSDGETTIMEOFDAY) && defined(H5_HAVE_STRUCT_TIMEZONE) /* Irix5.3 */ { - struct timezone tz; - if (BSDgettimeofday(NULL, &tz)<0) { - HRETURN_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, - "unable to obtain local timezone information"); - } - the_time -= tz.tz_minuteswest*60 - (tm.tm_isdst?3600:0); + struct timezone tz; + if (HDBSDgettimeofday(NULL, &tz)<0) { + HRETURN_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, + "unable to obtain local timezone information"); + } + the_time -= tz.tz_minuteswest * 60 - (tm.tm_isdst ? 3600 : 0); } #elif defined(H5_HAVE_GETTIMEOFDAY) && defined(H5_HAVE_STRUCT_TIMEZONE) { struct timezone tz; - if (gettimeofday(NULL, &tz)<0) { + + if (HDgettimeofday(NULL, &tz) < 0) { HRETURN_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to obtain local timezone information"); } - the_time -= tz.tz_minuteswest*60 - (tm.tm_isdst?3600:0); + + the_time -= tz.tz_minuteswest * 60 - (tm.tm_isdst ? 3600 : 0); } #elif defined (WIN32) && !defined (__MWERKS__) - { - - struct timeb timebuffer; - long tz; - ftime( &timebuffer ); - - tz = timebuffer.timezone; - - the_time -=tz*60-3600*_daylight; + { + struct timeb timebuffer; + long tz; - -} + ftime(&timebuffer); + tz = timebuffer.timezone; + the_time -= tz * 60 - 3600 * _daylight; + } #else /* * The catch-all. If we can't convert a character string universal |