~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_time.h

Merged in latest plugin-slot-reorg.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
extern uint64_t log_10_int[20];
37
37
extern unsigned char days_in_month[];
38
38
 
39
 
/*
40
 
  Portable time_t replacement.
41
 
  Should be signed and hold seconds for 1902 -- 2038-01-19 range
42
 
  i.e at least a 32bit variable
43
 
 
44
 
  Using the system built in time_t is not an option as
45
 
  we rely on the above requirements in the time functions
46
 
 
47
 
  For example QNX has an unsigned time_t type
48
 
*/
49
 
typedef long my_time_t;
50
 
 
51
 
#define MY_TIME_T_MAX INT32_MAX
52
 
#define MY_TIME_T_MIN INT32_MIN
53
 
 
54
39
/* Time handling defaults */
55
40
#define TIMESTAMP_MAX_YEAR 2038
56
41
#define TIMESTAMP_MIN_YEAR (1900 + YY_PART_YEAR - 1)
129
114
  return true;
130
115
}
131
116
 
132
 
my_time_t 
 
117
time_t
133
118
my_system_gmt_sec(const DRIZZLE_TIME *t, long *my_timezone,
134
119
                  bool *in_dst_time_gap);
135
120
 
150
135
int my_datetime_to_str(const DRIZZLE_TIME *l_time, char *to);
151
136
int my_TIME_to_str(const DRIZZLE_TIME *l_time, char *to);
152
137
 
153
 
/* 
 
138
/*
154
139
  Available interval types used in any statement.
155
140
 
156
141
  'interval_type' must be sorted so that simple intervals comes first,
157
142
  ie year, quarter, month, week, day, hour, etc. The order based on
158
143
  interval size is also important and the intervals should be kept in a
159
144
  large to smaller order. (get_interval_value() depends on this)
160
 
 
161
 
  Note: If you change the order of elements in this enum you should fix 
162
 
  order of elements in 'interval_type_to_name' and 'interval_names' 
163
 
  arrays 
164
 
  
 
145
 
 
146
  Note: If you change the order of elements in this enum you should fix
 
147
  order of elements in 'interval_type_to_name' and 'interval_names'
 
148
  arrays
 
149
 
165
150
  See also interval_type_to_name, get_interval_value, interval_names
166
151
*/
167
152