WARNING: TimeTrex was unable to set your time zone.

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Locked
centaur5
Posts: 15
Joined: Sat May 26, 2007 11:28 am

WARNING: TimeTrex was unable to set your time zone.

Post by centaur5 »

After I completed the fields in My Account -> Preferences I received the following error:

WARNING: TimeTrex was unable to set your time zone. Please contact your TimeTrex administrator immediately. For more information please click here.

I followed the instructions at http://forums.timetrex.com/viewtopic.php?t=40 but that didn't seem to fix my problem so I continued to search for other commands to set time zones in MySQL and attempted SET GLOBAL time_zone = SYSTEM; after logging in via mysql -u root -p. I'm using Timetrex 1.6.6, PHP 5, and Apache2 on Xubuntu 7.04. My timestamps on a different program that uses MySQL seems to function properly so this doesn't make much sense to me. I verified that my system time zone is correct (mountain) and also set it up to synchronize over the internet just in case that would affect anything.

Thanks.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

TimeTrex doesn't use your system timezone, it uses whichever one you have selected in your preferences, so try this:

SET GLOBAL time_zone = "MST7MDT";

Assuming that is the timezone you plan on using.

Does it give any errors?
centaur5
Posts: 15
Joined: Sat May 26, 2007 11:28 am

Post by centaur5 »

That's good to know, I was under the impression that those commands I was using earlier would set the time zone in MySQL to the same time zone as the system. Here was the result of the command you suggested:

mysql> SET GLOBAL time_zone = "MST7MDT";
ERROR 1298 (HY000): Unknown or incorrect time zone: 'MST7MDT'

Thanks for your response, I've been anxious all week to get this going.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Okay, so MySQL does not have a MST7MDT timezone, which probably means it doesn't have any timezones at all.

Try running these SQL commands:

Code: Select all

use mysql;
select * from time_zone_name;
My guess is they will fail, or show no results. So what likely happened is you didn't import the timezones properly as per the FAQ, there was an error importing them, or your system doesn't have any timezones too import, or your timezones aren't in /usr/share/zoneinfo.

When you followed the instructions in the FAQ, what was the output? (you can do it again without harm BTW)
centaur5
Posts: 15
Joined: Sat May 26, 2007 11:28 am

Post by centaur5 »

This was the output from the command suggested in the post that I followed:

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

It gave me an error when I first ran it over a week ago after installing but I thought those alternate commands I found would have gotten around it. After I discovered my time zones were in /usr/share/zoneinfo and the output from the command "select * from time_zone_name;" was empty I decided to go back to that post and try it again. After modifying the command to be "mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql" and entering my password it successfully imported my zoneinfo (with the exception of other countries) and now it works fine. Thanks for your help!
Locked