summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/rest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rest.c b/src/rest.c
index 81d2f54..04a715f 100644
--- a/src/rest.c
+++ b/src/rest.c
@@ -3497,9 +3497,9 @@ static uint32_t og_tm_months_mask(struct tm *tm)
return 1 << tm->tm_mon;
}
-static uint32_t og_tm_hours_mask(struct tm *tm)
+static uint16_t og_tm_hours_mask(struct tm *tm)
{
- return 1 << (tm->tm_hour - 12);
+ return tm->tm_hour >= 12 ? 1 << (tm->tm_hour - 12) : 1 << tm->tm_hour;
}
static uint32_t og_tm_ampm(struct tm *tm)