MCPcopy Create free account
hub / github.com/TheOfficialFloW/VitaShell / getTimeString

Function getTimeString

utils.c:367–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

365}
366
367void 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
386int debugPrintf(const char *text, ...) {
387 va_list list;

Callers 3

initPropertyDialogFunction · 0.85
browserMainFunction · 0.85
drawShellInfoFunction · 0.85

Calls 1

convertUtcToLocalTimeFunction · 0.85

Tested by

no test coverage detected