22#include <drizzled/function/time/curtime.h>
24#include <drizzled/session.h>
25#include <drizzled/session/times.h>
26#include <drizzled/current_session.h>
31void Item_func_curtime::fix_length_and_dec()
33 collation.set(&my_charset_bin);
37 store_now_in_TIME(<ime);
39 ltime.year= ltime.month= ltime.day= 0;
40 ltime.time_type = type::DRIZZLE_TIMESTAMP_TIME;
42 cached_temporal.set_hours(ltime.hour);
43 cached_temporal.set_minutes(ltime.minute);
44 cached_temporal.set_seconds(ltime.second);
47void Item_func_curtime_local::store_now_in_TIME(
type::Time *now_time)
49 (void) cached_temporal.from_time_t(current_session->times.getCurrentTimestampEpoch());
54 now_time->hour= cached_temporal.hours();
55 now_time->minute= cached_temporal.minutes();
56 now_time->second= cached_temporal.seconds();
59void Item_func_curtime_utc::store_now_in_TIME(
type::Time *now_time)
61 (void) cached_temporal.from_time_t(current_session->times.getCurrentTimestampEpoch());
66 now_time->hour= cached_temporal.hours();
67 now_time->minute= cached_temporal.minutes();
68 now_time->second= cached_temporal.seconds();
71bool Item_func_curtime::get_temporal(
Time &to)
bool get_time(type::Time &res)
static const int MAX_STRING_LENGTH
TODO: Rename this file - func.h is stupid.