MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / GetText

Method GetText

Libraries/unrar/timefn.cpp:225–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223
224
225void RarTime::GetText(wchar *DateStr,size_t MaxSize,bool FullMS)
226{
227 if (IsSet())
228 {
229 RarLocalTime lt;
230 GetLocal(&lt);
231 if (FullMS)
232 swprintf(DateStr,MaxSize,L"%u-%02u-%02u %02u:%02u:%02u,%09u",lt.Year,lt.Month,lt.Day,lt.Hour,lt.Minute,lt.Second,lt.Reminder*(1000000000/TICKS_PER_SECOND));
233 else
234 swprintf(DateStr,MaxSize,L"%u-%02u-%02u %02u:%02u",lt.Year,lt.Month,lt.Day,lt.Hour,lt.Minute);
235 }
236 else
237 {
238 // We use escape before '?' to avoid weird C trigraph characters.
239 wcsncpyz(DateStr,L"\?\?\?\?-\?\?-\?\? \?\?:\?\?",MaxSize);
240 }
241}
242
243
244#ifndef SFX_MODULE

Callers 2

ListFileHeaderFunction · 0.80
uiAskReplaceFunction · 0.80

Calls 1

wcsncpyzFunction · 0.85

Tested by

no test coverage detected