summaryrefslogtreecommitdiffstats
path: root/src/H5Omtime.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-10-26 20:40:30 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-10-26 20:40:30 (GMT)
commitb7310b0d1f1042ed14928b378852e034231f6747 (patch)
tree3a43dec6213941e62ea903f4ff0a92a462c9ce58 /src/H5Omtime.c
parent00aaf8e6f45fed0e4a1dcce9de230826009e0b39 (diff)
downloadhdf5-b7310b0d1f1042ed14928b378852e034231f6747.zip
hdf5-b7310b0d1f1042ed14928b378852e034231f6747.tar.gz
hdf5-b7310b0d1f1042ed14928b378852e034231f6747.tar.bz2
[svn-r28229] HDFFV-9550: Rework timezone usage to localize the #ifdef blocks to a HDget_timezone function.
Diffstat (limited to 'src/H5Omtime.c')
-rw-r--r--src/H5Omtime.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index 32248fa..d8c5305 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -186,12 +186,6 @@ H5O_mtime_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5
int i;
struct tm tm;
void *ret_value = NULL; /* Return value */
-#if _MSC_VER >= 1900 // VS 2015
-// In gcc and in Visual Studio prior to VS 2015 'timezone' is a global
-// variable declared in time.h. That variable was deprecated and in VS 2015
-// is removed, with _get_timezone replacing it.
- long timezone = 0;
-#endif
FUNC_ENTER_NOAPI_NOINIT
@@ -232,11 +226,7 @@ H5O_mtime_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5
/* BSD-like systems */
the_time += tm.tm_gmtoff;
#elif defined(H5_HAVE_TIMEZONE)
- #if _MSC_VER >= 1900 // VS 2015
- HDget_timezone(&timezone);
- #endif
- /* GNU/Linux systems */
- the_time -= timezone - (tm.tm_isdst ? 3600 : 0);
+ the_time -= HDget_timezone() - (tm.tm_isdst ? 3600 : 0);
#else
/*
* The catch-all. If we can't convert a character string universal