blob: 810092c8cea8c2aab8799b6e1ab9ca6f333b5d2d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
--- applets/clock/clock-location.c.orig 2024-02-20 01:30:10 UTC
+++ applets/clock/clock-location.c
@@ -447,19 +447,27 @@ clock_location_get_offset (ClockLocation *loc)
unsetenv ("TZ");
tm = localtime (&t);
+#ifdef __FreeBSD__
+ sys_timezone = -tm->tm_gmtoff;
+#else
sys_timezone = timezone;
if (tm->tm_isdst > 0) {
sys_timezone -= 3600;
}
+#endif
setenv ("TZ", priv->timezone, 1);
tm = localtime (&t);
+#ifdef __FreeBSD__
+ local_timezone = -tm->tm_gmtoff;
+#else
local_timezone = timezone;
if (tm->tm_isdst > 0) {
local_timezone -= 3600;
}
+#endif
offset = local_timezone - sys_timezone;
|