22 #include <drizzled/function/time/curtime.h>
24 #include <drizzled/session.h>
25 #include <drizzled/session/times.h>
26 #include <drizzled/current_session.h>
31 void 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;
47 void 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();
59 void 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();
71 bool Item_func_curtime::get_temporal(Time &to)