106 Time(uint32_t year_arg,
112 usec_t second_part_arg,
113 timestamp_t type_arg) :
120 second_part(second_part_arg),
126 Time(uint32_t hour_arg,
129 usec_t second_part_arg,
137 second_part(second_part_arg),
139 time_type(DRIZZLE_TIMESTAMP_TIME)
143 uint32_t year, month, day, hour, minute, second;
146 timestamp_t time_type;
150 year= month= day= hour= minute= second= second_part= 0;
152 time_type= DRIZZLE_TIMESTAMP_DATE;
155 timestamp_t type()
const
160 void convert(
drizzled::String &str, timestamp_t arg= type::DRIZZLE_TIMESTAMP_DATETIME);
161 void convert(
char *str,
size_t &to_length, timestamp_t arg= type::DRIZZLE_TIMESTAMP_DATETIME);
162 void convert(datetime_t &datetime, timestamp_t arg= type::DRIZZLE_TIMESTAMP_DATETIME);
163 void convert(datetime_t &ret, int64_t nr, uint32_t flags);
164 void convert(datetime_t &ret, int64_t nr, uint32_t flags, type::cut_t &was_cut);
165 void convert(type::epoch_t &epoch,
long *my_timezone)
const;
167 void truncate(
const timestamp_t arg);
169 bool store(
const char *str,uint32_t length,
int &warning, type::timestamp_t arg= DRIZZLE_TIMESTAMP_TIME);
170 type::timestamp_t store(
const char *str, uint32_t length, uint32_t flags, type::cut_t &was_cut);
171 type::timestamp_t store(
const char *str, uint32_t length, uint32_t flags);
172 void store(type::epoch_t from);
173 void store(type::epoch_t from, usec_t from_fractional_seconds);
174 void store(
const tm&);
175 void store(
const timeval&);
178 static const uint32_t FRACTIONAL_DIGITS= 1000000;
179 static const size_t MAX_STRING_LENGTH= 32;
181 bool check(
bool not_zero_date, uint32_t flags, type::cut_t &was_cut)
const;
183 inline bool isValidEpoch()
const
185 if ((year < TIMESTAMP_MIN_YEAR) or (year == TIMESTAMP_MIN_YEAR && (month < 12 || day < 31)))
219 INTERVAL_YEAR, INTERVAL_QUARTER, INTERVAL_MONTH, INTERVAL_WEEK, INTERVAL_DAY,
220 INTERVAL_HOUR, INTERVAL_MINUTE, INTERVAL_SECOND, INTERVAL_MICROSECOND,
221 INTERVAL_YEAR_MONTH, INTERVAL_DAY_HOUR, INTERVAL_DAY_MINUTE,
222 INTERVAL_DAY_SECOND, INTERVAL_HOUR_MINUTE, INTERVAL_HOUR_SECOND,
223 INTERVAL_MINUTE_SECOND, INTERVAL_DAY_MICROSECOND, INTERVAL_HOUR_MICROSECOND,