| 223 | |
| 224 | |
| 225 | void RarTime::GetText(wchar *DateStr,size_t MaxSize,bool FullMS) |
| 226 | { |
| 227 | if (IsSet()) |
| 228 | { |
| 229 | RarLocalTime lt; |
| 230 | GetLocal(<); |
| 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 |
no test coverage detected