From af9a1aaa8fc8582bd0d2635d3750894ade49b73a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 28 Apr 2020 21:25:13 +0300 Subject: + fix for %p --- plugins/NewStory/src/templates.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp index 29bab54ccf..0ca537a60c 100644 --- a/plugins/NewStory/src/templates.cpp +++ b/plugins/NewStory/src/templates.cpp @@ -238,8 +238,7 @@ void vfEvent(int, TemplateVars *vars, MCONTACT, ItemData *item) vars->SetVar('w', TranslateW(weekDays[st.wDayOfWeek]), false); // %p: AM/PM symbol - GetTimeFormatW(iLocale, 0, &st, L"tt", buf, _countof(buf)); - vars->SetVar('p', buf, true); + vars->SetVar('p', (st.wHour > 11) ? L"PM" : L"AM", true); // %O: Name of month, translatable vars->SetVar('O', TranslateW(months[st.wMonth-1]), false); -- cgit v1.2.3