23
#include <drizzled/tztime.h>
24
#include <drizzled/gettext.h>
25
#include <drizzled/session.h>
26
#include <drizzled/time_functions.h>
23
#include "drizzled/tzfile.h"
24
#include "drizzled/tztime.h"
25
#include "drizzled/gettext.h"
26
#include "drizzled/session.h"
27
#include "drizzled/time_functions.h"
128
129
Time_zone *my_tz_SYSTEM= &tz_SYSTEM;
134
* Initialize time zone support infrastructure.
137
* This function will init memory structures needed for time zone support,
138
* it will register mandatory SYSTEM time zone in them. It will try to open
139
* mysql.time_zone* tables and load information about default time zone and
140
* information which further will be shared among all time zones loaded.
141
* If system tables with time zone descriptions don't exist it won't fail
142
* (unless default_tzname is time zone from tables). If bootstrap parameter
143
* is true then this routine assumes that we are in bootstrap mode and won't
144
* load time zone descriptions unless someone specifies default time zone
145
* which is supposedly stored in those tables.
146
* It'll also set default time zone if it is specified.
148
* @param session current thread object
149
* @param default_tzname default time zone or 0 if none.
150
* @param bootstrap indicates whenever we are in bootstrap mode
157
my_tz_init(Session *session, const char *default_tzname)
161
String tmp_tzname2(default_tzname, &my_charset_utf8_general_ci);
163
Time zone tables may be open here, and my_tz_find() may open
164
most of them once more, but this is OK for system tables open
167
if (!(global_system_variables.time_zone= my_tz_find(session, &tmp_tzname2)))
169
errmsg_printf(ERRMSG_LVL_ERROR,
170
_("Fatal error: Illegal or unknown default time zone '%s'"),
181
* Get Time_zone object for specified time zone.
184
* Not implemented yet. This needs to hook into some sort of OS system call.
187
my_tz_find(Session *,
130
193
} /* namespace drizzled */