diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/gwps-common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index 9e5329bd4f..2429d74b86 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c | |||
@@ -1106,6 +1106,8 @@ static char *get_token_value(struct gui_wps *gwps, | |||
1106 | 1106 | ||
1107 | case WPS_TOKEN_RTC_MONTH: | 1107 | case WPS_TOKEN_RTC_MONTH: |
1108 | /* m: month (01..12) */ | 1108 | /* m: month (01..12) */ |
1109 | if (intval) | ||
1110 | *intval = tm->tm_mon + 1; | ||
1109 | snprintf(buf, buf_size, "%02d", tm->tm_mon + 1); | 1111 | snprintf(buf, buf_size, "%02d", tm->tm_mon + 1); |
1110 | return buf; | 1112 | return buf; |
1111 | 1113 | ||
@@ -1151,11 +1153,15 @@ static char *get_token_value(struct gui_wps *gwps, | |||
1151 | 1153 | ||
1152 | case WPS_TOKEN_RTC_DAY_OF_WEEK_START_MON: | 1154 | case WPS_TOKEN_RTC_DAY_OF_WEEK_START_MON: |
1153 | /* u: day of week (1..7); 1 is Monday */ | 1155 | /* u: day of week (1..7); 1 is Monday */ |
1156 | if (intval) | ||
1157 | *intval = (tm->tm_wday == 0) ? 7 : tm->tm_wday; | ||
1154 | snprintf(buf, buf_size, "%1d", tm->tm_wday + 1); | 1158 | snprintf(buf, buf_size, "%1d", tm->tm_wday + 1); |
1155 | return buf; | 1159 | return buf; |
1156 | 1160 | ||
1157 | case WPS_TOKEN_RTC_DAY_OF_WEEK_START_SUN: | 1161 | case WPS_TOKEN_RTC_DAY_OF_WEEK_START_SUN: |
1158 | /* w: day of week (0..6); 0 is Sunday */ | 1162 | /* w: day of week (0..6); 0 is Sunday */ |
1163 | if (intval) | ||
1164 | *intval = tm->tm_wday + 1; | ||
1159 | snprintf(buf, buf_size, "%1d", tm->tm_wday); | 1165 | snprintf(buf, buf_size, "%1d", tm->tm_wday); |
1160 | return buf; | 1166 | return buf; |
1161 | #endif | 1167 | #endif |