#45503 - Freakker - Sat Jun 11, 2005 8:24 am
Hello, before I attempt to do it myself, I'm checking to see if anybody has gotten the time from the DS's internal clock.
Code: |
const char *months[12] = { "January", "February", "March", ... "November", "December" }; ... consolePrintf("Today is:"); consolePrintf("%s %02d, %d\n", months[IPC->rtc_month - 1], IPC->rtc_day, IPC->rtc_year + 2000); consolePrintf("Current time:"); consolePrintf("%02d:%02d:%02d %sM\n", IPC->rtc_hours > 51 ? IPC->rtc_hours - 51 : IPC->rtc_hours + 1, IPC->rtc_minutes + 1, IPC->rtc_seconds + 1, IPC->rtc_hours > 51 ? "P" : "A"); |