Date Functions

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
cwbowron
Posts: 76
Joined: Fri May 06, 2005 4:22 am
Location: East Lansing, MI
Contact:

Date Functions

Post by cwbowron »

Has anyone uncovered or have functions to calculate the current year, month and day? I see that sceKernelLibcTime can return seconds since the epoch and that time() has been implemented in the pspsdk, but localtime() and gmtime() are missing according to LIB.status in the pspsdk. Are there any sce* functions for retrieving current date info?

Thanks.
User avatar
cwbowron
Posts: 76
Joined: Fri May 06, 2005 4:22 am
Location: East Lansing, MI
Contact:

Post by cwbowron »

Ok, I figured it out.

newlib implements localtime() so I used -lc -lpspglue rather than -lpsplibc
Lex
Posts: 27
Joined: Wed May 11, 2005 8:25 pm
Location: Germany

Post by Lex »

You can use
0xe7c27d1b sceRtcGetCurrentClockLocalTime
and then
0x779242a2 sceRtcConvertLocalTimeToUTC
Post Reply