aboutsummaryrefslogtreecommitdiffstats
path: root/common/gettime.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/gettime.c')
-rw-r--r--common/gettime.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/gettime.c b/common/gettime.c
index 9702bbcac..9c6365886 100644
--- a/common/gettime.c
+++ b/common/gettime.c
@@ -740,10 +740,10 @@ rfctimestamp (u32 stamp)
if (!tp)
return NULL;
return xtryasprintf ("%.3s, %02d %.3s %04d %02d:%02d:%02d +0000",
- ("SunMonTueWedThuFriSat" + (tp->tm_wday%7)*3),
+ &"SunMonTueWedThuFriSat"[(tp->tm_wday%7)*3],
tp->tm_mday,
- ("JanFebMarAprMayJunJulAugSepOctNovDec"
- + (tp->tm_mon%12)*3),
+ &"JanFebMarAprMayJunJulAugSepOctNovDec"
+ [(tp->tm_mon%12)*3],
tp->tm_year + 1900,
tp->tm_hour,
tp->tm_min,