summaryrefslogtreecommitdiffstats
path: root/src/H5Omtime.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-10-21 21:22:06 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-10-21 21:22:06 (GMT)
commitaa4284b2a3ce1908f339bd07da0370c493d71b89 (patch)
tree549fe1380b90105d4b3bcdffbed88d30a62c443a /src/H5Omtime.c
parent9f702766f84887c04cfcaf0a41f748636ff1062d (diff)
downloadhdf5-aa4284b2a3ce1908f339bd07da0370c493d71b89.zip
hdf5-aa4284b2a3ce1908f339bd07da0370c493d71b89.tar.gz
hdf5-aa4284b2a3ce1908f339bd07da0370c493d71b89.tar.bz2
[svn-r28174] HDFFV-9550: Add VS2015 fix for timezone.
Diffstat (limited to 'src/H5Omtime.c')
-rw-r--r--src/H5Omtime.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index 622d57d..cac5aca 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -226,6 +226,13 @@ 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
+ // 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;
+ _get_timezone(&timezone);
+ #endif
/* GNU/Linux systems */
the_time -= timezone - (tm.tm_isdst ? 3600 : 0);
#else