From fb32fdeba1f428a3f6c30c8951e82f2a2eec23a8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 12 Aug 2021 14:01:09 +0200 Subject: Merging upstream version 1.15. Signed-off-by: Daniel Baumann --- plugins/wdc/wdc-utils.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins/wdc/wdc-utils.c') diff --git a/plugins/wdc/wdc-utils.c b/plugins/wdc/wdc-utils.c index 2740181..52c427b 100644 --- a/plugins/wdc/wdc-utils.c +++ b/plugins/wdc/wdc-utils.c @@ -77,7 +77,11 @@ int wdc_UtilsGetTime(PUtilsTimeInfo timeInfo) timeInfo->second = currTimeInfo.tm_sec; timeInfo->msecs = 0; timeInfo->isDST = currTimeInfo.tm_isdst; +#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__MUSL__) timeInfo->zone = -currTimeInfo.tm_gmtoff / 60; +#else + timeInfo->zone = -1 * (timezone / SECONDS_IN_MIN); +#endif return WDC_STATUS_SUCCESS; } -- cgit v1.2.3