summaryrefslogtreecommitdiffstats
path: root/src/rds_mod.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rds_mod.c')
-rw-r--r--src/rds_mod.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rds_mod.c b/src/rds_mod.c
index 865ca11..8e31b0d 100644
--- a/src/rds_mod.c
+++ b/src/rds_mod.c
@@ -109,7 +109,13 @@ int get_rds_ct_group(uint16_t *blocks)
utc = localtime(&now);
+ //'struct tm' has no member named 'tm_gmtoff' on Windows+MinGW
+ #if defined(__APPLE__) || defined(__FreeBSD__)
offset = utc->tm_gmtoff / (30 * 60);
+ #else
+ offset = time(NULL) / (30 * 60);
+ #endif
+
blocks[3] |= abs(offset);
if (offset < 0)
blocks[3] |= 0x20;