Lines Matching refs:ltime

62 void mix_date_and_time(MYSQL_TIME *ldate, const MYSQL_TIME *ltime);
73 MYSQL_TIME *ltime, my_time_flags_t flags);
74 bool my_double_to_datetime_with_warn(double nr, MYSQL_TIME *ltime,
76 bool my_longlong_to_datetime_with_warn(longlong nr, MYSQL_TIME *ltime,
79 MYSQL_TIME *ltime);
80 bool my_double_to_time_with_warn(double nr, MYSQL_TIME *ltime);
81 bool my_longlong_to_time_with_warn(longlong nr, MYSQL_TIME *ltime);
84 inline void datetime_to_time(MYSQL_TIME *ltime) in datetime_to_time() argument
86 ltime->year= ltime->month= ltime->day= 0; in datetime_to_time()
87 ltime->time_type= MYSQL_TIMESTAMP_TIME; in datetime_to_time()
89 inline void datetime_to_date(MYSQL_TIME *ltime) in datetime_to_date() argument
91 ltime->hour= ltime->minute= ltime->second= ltime->second_part= 0; in datetime_to_date()
92 ltime->time_type= MYSQL_TIMESTAMP_DATE; in datetime_to_date()
94 inline void date_to_datetime(MYSQL_TIME *ltime) in date_to_datetime() argument
96 ltime->time_type= MYSQL_TIMESTAMP_DATETIME; in date_to_datetime()
119 bool my_TIME_to_str(const MYSQL_TIME *ltime, String *str, uint dec);
122 bool date_add_interval(MYSQL_TIME *ltime, interval_type int_type,
137 static inline bool str_to_time(const String *str, MYSQL_TIME *ltime, in str_to_time() argument
141 ltime, flags, status); in str_to_time()
144 bool time_add_nanoseconds_with_round(MYSQL_TIME *ltime, uint nanoseconds,
151 static inline bool str_to_datetime(const String *str, MYSQL_TIME *ltime, in str_to_datetime() argument
156 ltime, flags, status); in str_to_datetime()
159 bool datetime_add_nanoseconds_with_round(MYSQL_TIME *ltime,
177 inline void my_time_trunc(MYSQL_TIME *ltime, uint decimals) in my_time_trunc() argument
179 ltime->second_part-= my_time_fraction_remainder(ltime->second_part, decimals); in my_time_trunc()
181 inline void my_datetime_trunc(MYSQL_TIME *ltime, uint decimals) in my_datetime_trunc() argument
183 return my_time_trunc(ltime, decimals); in my_datetime_trunc()
189 bool my_time_round(MYSQL_TIME *ltime, uint decimals);
190 bool my_datetime_round(MYSQL_TIME *ltime, uint decimals, int *warnings);
194 inline ulonglong TIME_to_ulonglong_datetime_round(const MYSQL_TIME *ltime) in TIME_to_ulonglong_datetime_round() argument
197 if (ltime->second_part < 500000) in TIME_to_ulonglong_datetime_round()
198 return TIME_to_ulonglong_datetime(ltime); in TIME_to_ulonglong_datetime_round()
199 if (ltime->second < 59) in TIME_to_ulonglong_datetime_round()
200 return TIME_to_ulonglong_datetime(ltime) + 1; in TIME_to_ulonglong_datetime_round()
203 MYSQL_TIME tmp= *ltime; in TIME_to_ulonglong_datetime_round()
209 inline ulonglong TIME_to_ulonglong_time_round(const MYSQL_TIME *ltime) in TIME_to_ulonglong_time_round() argument
211 if (ltime->second_part < 500000) in TIME_to_ulonglong_time_round()
212 return TIME_to_ulonglong_time(ltime); in TIME_to_ulonglong_time_round()
213 if (ltime->second < 59) in TIME_to_ulonglong_time_round()
214 return TIME_to_ulonglong_time(ltime) + 1; in TIME_to_ulonglong_time_round()
216 MYSQL_TIME tmp= *ltime; in TIME_to_ulonglong_time_round()
222 inline ulonglong TIME_to_ulonglong_round(const MYSQL_TIME *ltime) in TIME_to_ulonglong_round() argument
224 switch (ltime->time_type) in TIME_to_ulonglong_round()
227 return TIME_to_ulonglong_time_round(ltime); in TIME_to_ulonglong_round()
229 return TIME_to_ulonglong_datetime_round(ltime); in TIME_to_ulonglong_round()
231 return TIME_to_ulonglong_date(ltime); in TIME_to_ulonglong_round()
239 inline double TIME_microseconds(const MYSQL_TIME *ltime) in TIME_microseconds() argument
241 return (double) ltime->second_part / 1000000; in TIME_microseconds()
244 inline double TIME_to_double_datetime(const MYSQL_TIME *ltime) in TIME_to_double_datetime() argument
246 return (double) TIME_to_ulonglong_datetime(ltime) + TIME_microseconds(ltime); in TIME_to_double_datetime()
250 inline double TIME_to_double_time(const MYSQL_TIME *ltime) in TIME_to_double_time() argument
252 return (double) TIME_to_ulonglong_time(ltime) + TIME_microseconds(ltime); in TIME_to_double_time()
256 inline double TIME_to_double(const MYSQL_TIME *ltime) in TIME_to_double() argument
258 return (double) TIME_to_ulonglong(ltime) + TIME_microseconds(ltime); in TIME_to_double()
262 static inline bool check_fuzzy_date(const MYSQL_TIME *ltime, in check_fuzzy_date() argument
265 return !(fuzzydate & TIME_FUZZY_DATE) && (!ltime->month || !ltime->day); in check_fuzzy_date()
269 non_zero_date(const MYSQL_TIME *ltime) in non_zero_date() argument
271 return ltime->year || ltime->month || ltime->day; in non_zero_date()
275 non_zero_time(const MYSQL_TIME *ltime) in non_zero_time() argument
277 return ltime->hour || ltime->minute || ltime->second || ltime->second_part; in non_zero_time()
282 void TIME_from_longlong_packed(MYSQL_TIME *ltime,