147 static inline int sceRtcGetMicrosecond(
const SceDateTime *
time){
return (
int)
time->microsecond;}
151 if (year<1 || year>9999)
153 time->year = (
unsigned short)year;
157 if (month<1 || month>12) {
160 time->month = (
unsigned short)month;
164 if (day<1 || day>31) {
167 time->day = (
unsigned short)day;
171 if (hour<0 || hour>23) {
174 time->hour = (
unsigned short)hour;
178 if (minute<0 || minute>59) {
181 time->minute = (
unsigned short)minute;
185 if (second<0 || second>59) {
188 time->second = (
unsigned short)second;
191 static inline int sceRtcSetMicrosecond(
SceDateTime *
time,
int microsecond){
192 if (microsecond<0 || microsecond>999999) {
195 time->microsecond = (
unsigned int)microsecond;
200 #define sceRtcGetCurrentTickUtc(_tick) sceRtcGetCurrentTick(_tick)
201 #define sceRtcGetCurrentClockUtc(_p) sceRtcGetCurrentClock(_p,0)
202 #define sceRtcGetCurrentNetworkTickUtc(_tick) sceRtcGetCurrentNetworkTick(_tick)
203 #define sceRtcConvertTime_tToDateTime(_timet, _pdatetime) sceRtcSetTime_t(_pdatetime, _timet)
204 #define sceRtcConvertTime64_tToDateTime(_timet, _pdatetime) sceRtcSetTime64_t(_pdatetime, _timet)
205 #define sceRtcConvertDateTimeToTime_t(_pdatetime, _ptimet) sceRtcGetTime_t(_pdatetime, _ptimet)
206 #define sceRtcConvertDateTimeToTime64_t(_pdatetime, _ptimet) sceRtcGetTime64_t(_pdatetime, _ptimet)
207 #define sceRtcConvertDosTimeToDateTime(_dostime, _pdatetime) sceRtcSetDosTime(_pdatetime, _dostime)
208 #define sceRtcConvertDateTimeToDosTime(_pdatetime, _pdostime) sceRtcGetDosTime(_pdatetime, _pdostime)
209 #define sceRtcConvertWin32TimeToDateTime(_pw32time, _pdatetime) sceRtcSetWin32FileTime(_pdatetime, _pw32time)
210 #define sceRtcConvertDateTimeToWin32Time(_pdatetime, _pw32time) sceRtcGetWin32FileTime(_pdatetime, _pw32time)
211 #define sceRtcConvertTickToDateTime(_ptick, _pdatetime) sceRtcSetTick(_pdatetime, _ptick)
212 #define sceRtcConvertDateTimeToTick(_pdatetime, _ptick) sceRtcGetTick(_pdatetime, _ptick)
SceUInt64 time
Time of the event occurred.
Definition: debug.h:7
int sceRtcGetTick(const SceDateTime *time, SceRtcTick *tick)
int _sceRtcConvertUtcToLocalTime(const SceRtcTick *utc, SceRtcTick *localtime)
Convert UTC to localtime.
int _sceRtcFormatRFC2822LocalTime(char *datetime, const SceRtcTick *utc, SceUInt64 *a3)
Convert RFC2822 time string from UTC with localtime.
int sceRtcTickAddTicks(SceRtcTick *pTick0, const SceRtcTick *pTick1, SceLong64 lAdd)
int sceRtcGetDayOfWeek(int year, int month, int day)
int sceRtcTickAddWeeks(SceRtcTick *pTick0, const SceRtcTick *pTick1, int lAdd)
int sceRtcSetWin32FileTime(SceDateTime *time, SceUInt64 ulWin32Time)
int sceRtcGetDosTime(const SceDateTime *time, unsigned int *puiDosTime)
int sceRtcGetCurrentAdNetworkTick(SceRtcTick *tick)
int sceRtcGetCurrentClockLocalTime(SceDateTime *time)
Get current real time clock time with system time zone.
int sceRtcFormatRFC3339(char *pszDateTime, const SceRtcTick *utc, int iTimeZoneMinutes)
int sceRtcGetCurrentClock(SceDateTime *time, int time_zone)
Get current real time clock time.
int sceRtcTickAddMinutes(SceRtcTick *pTick0, const SceRtcTick *pTick1, SceLong64 lAdd)
int _sceRtcFormatRFC2822(char *datetime, const SceRtcTick *utc, int offset, SceUInt64 *a4)
Convert RFC2822 time string from UTC.
int sceRtcParseRFC3339(SceRtcTick *utc, const char *pszDateTime)
int sceRtcConvertLocalTimeToUtc(const SceRtcTick *local_time, SceRtcTick *utc)
int sceRtcFormatRFC3339LocalTime(char *pszDateTime, const SceRtcTick *utc)
int sceRtcTickAddSeconds(SceRtcTick *pTick0, const SceRtcTick *pTick1, SceLong64 lAdd)
int sceRtcSetTick(SceDateTime *time, const SceRtcTick *tick)
int sceRtcSetDosTime(SceDateTime *time, unsigned int uiDosTime)
int sceRtcGetLastAdjustedTick(SceRtcTick *tick)
int sceRtcGetTime64_t(const SceDateTime *time, SceUInt64 *pullTime)
int sceRtcGetLastReincarnatedTick(SceRtcTick *tick)
int sceRtcParseDateTime(SceRtcTick *utc, const char *pszDateTime)
int _sceRtcFormatRFC3339(char *datetime, const SceRtcTick *utc, int offset, SceUInt64 *a4)
Convert RFC3339 time string from UTC.
int sceRtcFormatRFC2822LocalTime(char *pszDateTime, const SceRtcTick *utc)
int sceRtcTickAddDays(SceRtcTick *pTick0, const SceRtcTick *pTick1, int lAdd)
int sceRtcGetDaysInMonth(int year, int month)
int sceRtcGetCurrentRetainedNetworkTick(SceRtcTick *tick)
int sceRtcSetTime64_t(SceDateTime *time, SceUInt64 ullTime)
int sceRtcTickAddYears(SceRtcTick *pTick0, const SceRtcTick *pTick1, int lAdd)
int sceRtcIsLeapYear(int year)
int sceRtcGetCurrentTick(SceRtcTick *tick)
int sceRtcFormatRFC2822(char *pszDateTime, const SceRtcTick *utc, int iTimeZoneMinutes)
int sceRtcTickAddMonths(SceRtcTick *pTick0, const SceRtcTick *pTick1, int lAdd)
int sceRtcGetCurrentGpsTick(SceRtcTick *tick)
SceULong64 sceRtcGetAccumulativeTime(void)
int sceRtcConvertUtcToLocalTime(const SceRtcTick *utc, SceRtcTick *local_time)
int sceRtcTickAddHours(SceRtcTick *pTick0, const SceRtcTick *pTick1, int lAdd)
int _sceRtcConvertLocalTimeToUtc(const SceRtcTick *localtime, SceRtcTick *utc)
Convert localtime to UTC.
int sceRtcSetTime_t(SceDateTime *time, time_t iTime)
int sceRtcGetWin32FileTime(const SceDateTime *time, SceUInt64 *ulWin32Time)
unsigned int sceRtcGetTickResolution(void)
int sceRtcGetCurrentNetworkTick(SceRtcTick *tick)
int sceRtcTickAddMicroseconds(SceRtcTick *pTick0, const SceRtcTick *pTick1, SceLong64 lAdd)
int sceRtcGetTime_t(const SceDateTime *time, time_t *piTime)
int sceRtcCompareTick(const SceRtcTick *pTick1, const SceRtcTick *pTick2)
int sceRtcGetCurrentDebugNetworkTick(SceRtcTick *tick)
int sceRtcCheckValid(const SceDateTime *time)
int _sceRtcFormatRFC3339LocalTime(char *datetime, const SceRtcTick *utc, SceUInt64 *a3)
Convert RFC3339 time string from UTC with localtime.
@ SCE_RTC_ERROR_INVALID_DAY
Definition: rtc.h:27
@ SCE_RTC_ERROR_INVALID_HOUR
Definition: rtc.h:28
@ SCE_RTC_ERROR_INVALID_MONTH
Definition: rtc.h:26
@ SCE_RTC_ERROR_INVALID_MINUTE
Definition: rtc.h:29
@ SCE_RTC_ERROR_INVALID_SECOND
Definition: rtc.h:30
@ SCE_RTC_ERROR_INVALID_MICROSECOND
Definition: rtc.h:31
@ SCE_RTC_ERROR_INVALID_YEAR
Definition: rtc.h:25
int64_t SceLong64
Definition: types.h:53
uint64_t SceUInt64
Definition: types.h:51
uint64_t SceULong64
Definition: types.h:54