Date and time


Data Structures

struct  GSM_DateTime
struct  GSM_DeltaTime

Functions

char * DayOfWeek (unsigned int year, unsigned int month, unsigned int day)
void GSM_GetCurrentDateTime (GSM_DateTime *Date)
time_t Fill_Time_T (GSM_DateTime DT)
int GSM_GetLocalTimezoneOffset (void)
void Fill_GSM_DateTime (GSM_DateTime *Date, time_t timet)
char * OSDateTime (GSM_DateTime dt, bool TimeZone)
char * OSDate (GSM_DateTime dt)
bool CheckDate (GSM_DateTime *date)
bool CheckTime (GSM_DateTime *date)

Detailed Description

Date and time handling.

Function Documentation

bool CheckDate ( GSM_DateTime date  ) 

Checks whether date is valid. This does not check time, see CheckTime for this.

Parameters:
date Structure where to check date.
Returns:
True if date is correct.

bool CheckTime ( GSM_DateTime date  ) 

Checks whether time is valid. This does not check date, see CheckDate for this.

Parameters:
date Structure where to check time.
Returns:
True if time is correct.

char* DayOfWeek ( unsigned int  year,
unsigned int  month,
unsigned int  day 
)

Returns string for current day of week.

Parameters:
year Year.
month Month.
day Day.
Returns:
Pointer to static buffer containing day of week string.

void Fill_GSM_DateTime ( GSM_DateTime Date,
time_t  timet 
)

Converts time_t to gammu GSM_DateTime structure.

Parameters:
Date Storage for date.
timet Input date.

time_t Fill_Time_T ( GSM_DateTime  DT  ) 

Converts GSM_DateTime to time_t.

Parameters:
DT Input timestamp.
Returns:
time_t value.

void GSM_GetCurrentDateTime ( GSM_DateTime Date  ) 

Returns current timestamp.

Parameters:
Date Storage for date time structure.

int GSM_GetLocalTimezoneOffset ( void   ) 

Returns the local timezone offset in seconds. For example 7200 for CEST.

Returns:
Timezone offset seconds.

char* OSDate ( GSM_DateTime  dt  ) 

Converts date from timestamp to string according to OS settings.

Parameters:
dt Input timestamp.
Returns:
Pointer to static buffer containing string.

char* OSDateTime ( GSM_DateTime  dt,
bool  TimeZone 
)

Converts timestamp to string according to OS settings.

Parameters:
dt Input timestamp.
TimeZone Whether to include time zone.
Returns:
Pointer to static buffer containing string.


Generated on Mon Jan 5 15:44:30 2009 for Gammu API by  doxygen 1.5.6