| 365 | } |
| 366 | |
| 367 | void getTimeString(char string[16], int time_format, SceDateTime *time) { |
| 368 | SceDateTime time_local; |
| 369 | convertUtcToLocalTime(&time_local, time); |
| 370 | |
| 371 | switch(time_format) { |
| 372 | case SCE_SYSTEM_PARAM_TIME_FORMAT_12HR: |
| 373 | { |
| 374 | int hour = ((time_local.hour == 0) ? 12 : time_local.hour); |
| 375 | snprintf(string, 16, "%02d:%02d %s", (time_local.hour > 12) ? (time_local.hour - 12) : hour, |
| 376 | time_local.minute, time_local.hour >= 12 ? "PM" : "AM"); |
| 377 | break; |
| 378 | } |
| 379 | |
| 380 | case SCE_SYSTEM_PARAM_TIME_FORMAT_24HR: |
| 381 | snprintf(string, 16, "%02d:%02d", time_local.hour, time_local.minute); |
| 382 | break; |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | int debugPrintf(const char *text, ...) { |
| 387 | va_list list; |
no test coverage detected