mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Cleanup: moving timestamp_to_TIME() as a method to THD
This commit is contained in:
@ -7788,3 +7788,22 @@ Query_arena_stmt::~Query_arena_stmt()
|
||||
if (arena)
|
||||
thd->restore_active_arena(arena, &backup);
|
||||
}
|
||||
|
||||
|
||||
bool THD::timestamp_to_TIME(MYSQL_TIME *ltime, my_time_t ts,
|
||||
ulong sec_part, ulonglong fuzzydate)
|
||||
{
|
||||
time_zone_used= 1;
|
||||
if (ts == 0 && sec_part == 0)
|
||||
{
|
||||
if (fuzzydate & TIME_NO_ZERO_DATE)
|
||||
return 1;
|
||||
set_zero_time(ltime, MYSQL_TIMESTAMP_DATETIME);
|
||||
}
|
||||
else
|
||||
{
|
||||
variables.time_zone->gmt_sec_to_TIME(ltime, ts);
|
||||
ltime->second_part= sec_part;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user