| Server IP : 82.208.35.60 / Your IP : 216.73.216.238 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/www/iridium/files/ |
Upload File : |
--- third_party/pdfium/xfa/fxfa/parser/cxfa_timezoneprovider.cpp.orig 2022-03-28 18:11:04 UTC
+++ third_party/pdfium/xfa/fxfa/parser/cxfa_timezoneprovider.cpp
@@ -6,12 +6,16 @@
#include "xfa/fxfa/parser/cxfa_timezoneprovider.h"
+#include <stdint.h>
#include <stdlib.h>
#include <time.h>
#include "build/build_config.h"
static bool g_bProviderTimeZoneSet = false;
+#if defined(OS_FREEBSD)
+static long g_lTimeZoneOffset = 0;
+#endif
#if BUILDFLAG(IS_WIN)
#define TIMEZONE _timezone
@@ -24,9 +28,21 @@ static bool g_bProviderTimeZoneSet = false;
CXFA_TimeZoneProvider::CXFA_TimeZoneProvider() {
if (!g_bProviderTimeZoneSet) {
g_bProviderTimeZoneSet = true;
+#if defined(OS_FREEBSD)
+ time_t now = time(nullptr);
+ struct tm tm = {};
+
+ localtime_r(&now, &tm);
+ g_lTimeZoneOffset = tm.tm_gmtoff;
+#else
TZSET();
+#endif
}
+#if defined(OS_FREEBSD)
+ tz_minutes_ = static_cast<int8_t>((abs(g_lTimeZoneOffset) % 3600) / 60);
+#else
tz_minutes_ = TIMEZONE / -60;
+#endif
}
CXFA_TimeZoneProvider::~CXFA_TimeZoneProvider() = default;