69void
InitDate(
TDate *date,
unsigned long year, uint8_t month, uint8_t day)
78void InitTime(
TTime *time, uint8_t hour, uint8_t min, uint8_t sec,
unsigned long millisec)
#define __swi_end(number, func, call)
#define __swi_begin(number)
unsigned long year
Year: 20XX.
char timeZone
Internal ID of the selected timezone.
char yearNormBudd
Year mode: 1 - normal, 2 - buddhist.
uint8_t month
Month: 1-12.
uint32_t millisec
Milliseconds: 0-999.
uint8_t sec
Seconds: 0-59.
uint8_t min
Minutes: 0-59.
char timeFormat
0-24h, 1-12h
int GetDateTimeFromSecondsSince1997(const uint32_t *seconds, TDate *date, TTime *time)
Convert seconds to date and time (since 1997-01-01 00:00:00).
void DateAddYears(TDate *date, int years)
Add or subtract years from a date.
int GetDays(const TDate *date)
Get the days count.
int GetSecondsFromDateTime(uint32_t *seconds, const TDate *date, const TTime *time, const TDate *epoch)
Convert date and time to seconds.
int CmpTimes(const TTime *time1, const TTime *time2)
Compare two timestamps.
void GetTimeFromMilliseconds(TTime *time, uint32_t milliseconds)
Convert milliseconds to TTime.
int IsSummerTime(int time_zone)
Check time zone for summer time.
int GetTimeZoneShift(const TDate *date, const TTime *time, int timezone_id)
Get current timezone shift.
TDateTimeSettings * RamDateTimeSettings(void)
Get date and time settings from the phone.
void DateAddMonths(TDate *date, int months)
Add or subtract months from a date.
void DateAddDays(TDate *date, int days)
Add or subtract days from a date.
void GetTimeFromSeconds(TTime *time, uint32_t seconds)
Convert seconds to TTime.
int CmpDates(const TDate *date1, const TDate *date2)
Compare two dates.
int GetSecondsFromDateTimeSince1997(uint32_t *seconds, const TDate *date, const TTime *time)
Convert date and time to seconds (since 1997-01-01 00:00:00).
void GetDate_ws(WSHDR *ws, const TDate *date, unsigned int unk)
Put date into ws string.
void InitTime(TTime *time, uint8_t hour, uint8_t min, uint8_t sec, unsigned long millisec)
Initialize TTime structure.
TZ * RamTimeZones(void)
Get array of time zones.
int GetTimeZoneByGMT(const char *gmt)
Get time zone id by time zone.
void InitDate(TDate *date, unsigned long year, uint8_t month, uint8_t day)
Initialize TDate structure.
char * RamIsAutoTimeEnabled(void)
Get the address of the "Auto Time" enabled flag.
int IsLeapYear(const TDate *date)
Check date for leap year.
int GetDateTimeFromSeconds(const uint32_t *seconds, TDate *date, TTime *time, const TDate *epoch)
Convert seconds to date and time.
int GetDaysFromMonth(const TDate *date)
Get the days count in the month.
int GetSecondsFromTime(const TTime *time)
Calculate seconds from TTime.
void GetTime_ws(WSHDR *ws, const TTime *time, unsigned int unk)
Put time into ws string.
void GetDateTime(TDate *date, TTime *time)
Get current date and time.
char GetWeek(const TDate *date)
Get day of week for a date.
int GetCurrentTimeZone(void)
Get current time zone id.
void SetTimeZone(int time_zone)
Set time zone.