timezone - Setting MySQL time_zone info without shell access -
i working on database contains number of "date" fields. these dates need converted utc output, intend using convert_tz('thefield','gmt','utc')
. however, @@global.time_zone
variable not set (returns "system" @ present), , timezone information table empty. believe needs filled running mysql_tzinfo_to_sql
shell script (http://dev.mysql.com/doc/refman/4.1/en/time-zone-support.html).
my problem don't have kind of shell access system in question, it's impossible me run mysql_tzinfo_to_sql
script. therefore have 2 questions...
1) if mysql using "system" time zone @ moment, there way determine system time zone (remembering don't have shell or other access)?
2) possible generate information in mysql time zone table means other shell script, i.e. entirely within mysql itself?
grateful suggestions, thanks.
you can check time zone using with:
select @@global.time_zone, @@session.time_zone;
setting timezone:
set @@global.time_zone = 'system';
if want know time zone of system:
windows:
go cmd , key in systeminfo
linux:
date +%z
Comments
Post a Comment