Gammu internals  1.38.0
gammu-datetime.h
Go to the documentation of this file.
1 
7 #ifndef __gammu_datetime_h
8 #define __gammu_datetime_h
9 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 #include <time.h>
20 #include <gammu-error.h>
21 #include <gammu-statemachine.h>
22 
28 typedef struct {
32  int Timezone;
33 
37  int Second;
41  int Minute;
45  int Hour;
46 
50  int Day;
54  int Month;
58  int Year;
59 } GSM_DateTime;
60 
66 typedef struct {
70  int Timezone;
71 
75  int Second;
79  int Minute;
83  int Hour;
84 
88  int Day;
92  int Month;
96  int Year;
98 
110 char *DayOfWeek(unsigned int year, unsigned int month, unsigned int day);
111 
120 
130 time_t Fill_Time_T(GSM_DateTime DT);
131 
141 
150 void Fill_GSM_DateTime(GSM_DateTime * Date, time_t timet);
151 
160 void GSM_DateTimeFromTimestamp(GSM_DateTime *Date, const char *str);
161 
170 void GSM_DateTimeToTimestamp(GSM_DateTime *Date, char *str);
171 
182 char *OSDateTime(GSM_DateTime dt, gboolean TimeZone);
183 
193 char *OSDate(GSM_DateTime dt);
194 
206 
218 
230 
242 #ifdef __cplusplus
243 }
244 #endif
245 #endif
246 
247 /* Editor configuration
248  * vim: noexpandtab sw=8 ts=8 sts=8 tw=72:
249  */
char * OSDate(GSM_DateTime dt)
Definition: misc.c:305
GSM_Error
Definition: gammu-error.h:23
char * DayOfWeek(unsigned int year, unsigned int month, unsigned int day)
Definition: misc.c:129
int GSM_GetLocalTimezoneOffset(void)
Definition: misc.c:146
void Fill_GSM_DateTime(GSM_DateTime *Date, time_t timet)
Definition: misc.c:170
int gboolean
Definition: gammu-types.h:23
gboolean CheckTime(GSM_DateTime *date)
Definition: misc.c:363
char * OSDateTime(GSM_DateTime dt, gboolean TimeZone)
Definition: misc.c:264
void GSM_GetCurrentDateTime(GSM_DateTime *Date)
Definition: misc.c:184
time_t Fill_Time_T(GSM_DateTime DT)
Definition: misc.c:189
void GSM_DateTimeToTimestamp(GSM_DateTime *Date, char *str)
Definition: misc.c:155
void GSM_DateTimeFromTimestamp(GSM_DateTime *Date, const char *str)
Definition: misc.c:162
gboolean CheckDate(GSM_DateTime *date)
Definition: misc.c:349
GSM_Error GSM_SetDateTime(GSM_StateMachine *s, GSM_DateTime *date_time)
Definition: api.c:242
GSM_Error GSM_GetDateTime(GSM_StateMachine *s, GSM_DateTime *date_time)
Definition: api.c:229