forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Changing System Time Globally? Any SCE function Exports?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
KickinAezz



Joined: 03 Jun 2007
Posts: 328

PostPosted: Mon Aug 04, 2008 11:08 pm    Post subject: Changing System Time Globally? Any SCE function Exports? Reply with quote

Hello,

I was wondering if it was possible; It Should be...

I looked into sceRTC* but I've seen nothing that would be useful :|

How can we achieve that?
_________________
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
Back to top
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Tue Aug 05, 2008 12:44 am    Post subject: Reply with quote

sceRtcSetCurrentTick. Note however that it is a kernel export only.

Code:
void SetDate(pspTime *time)
{
   u64 tick, tick2;

   sceRtcGetTick(time, &tick);
   sceRtcConvertLocalTimeToUTC(&tick, &tick2);
   sceRtcSetCurrentTick(&tick2);
}
Back to top
View user's profile Send private message
KickinAezz



Joined: 03 Jun 2007
Posts: 328

PostPosted: Tue Aug 05, 2008 12:48 am    Post subject: Reply with quote

moonlight wrote:
sceRtcSetCurrentTick. Note however that it is a kernel export only.

Code:
void SetDate(pspTime *time)
{
   u64 tick, tick2;

   sceRtcGetTick(time, &tick);
   sceRtcConvertLocalTimeToUTC(&tick, &tick2);
   sceRtcSetCurrentTick(&tick2);
}


Thanks! This wasn't even in the latest PSPSDK.

[The closest I found before asking was sceRtcSetTick,]
It converts Hours, minutes and seconds and converts it into ticks based on a local pspTime struct.


This also changes time in XMB and home Right? [I hope it does...]
_________________
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.


Last edited by KickinAezz on Tue Aug 05, 2008 12:50 am; edited 1 time in total
Back to top
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Tue Aug 05, 2008 12:50 am    Post subject: Reply with quote

Yeah, the function is not in includes, but it is in the libpsprtc_driver library anyways.

P.S.: yeah this changes the date totally. I used that when i changed the date in 3.51 M33 installer :)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group