Solved

mysql CONVERT_TZ null centos

Posted on 2014-09-28
5
167 Views
Last Modified: 2014-11-22
I have a programmer who is using CONVERT_TZ in his code for a reports template using nvd3.
He tells me that there is a problem which is 'CONVERT_TZ null' on a centos box that we are working on.

I looked for a solution and found;
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql

However, this doesn't seem to work or it only works now and then and sometimes only on one server, not the other, yet they are both Centos 6.x using pretty much the same setup.

My question is.... does the programmer HAVE to use this or is there another way to achieve what ever he is trying to do?

Secondly, instead of or aside from the command above to fix the problem, is there something installed on one server which might not be installed on the other? I would much rather simply install what ever is missing over having to run mysql commands to fix the problem.
0
Comment
Question by:projects
  • 3
5 Comments
 
LVL 109

Accepted Solution

by:
Ray Paseur earned 250 total points
ID: 40348680
...another way to achieve what ever he is trying to do?
Would help to have an explanation of what he's trying to do. CONVERT_TZ returns null when the arguments are invalid.
http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_convert-tz
...something installed on one server which might not be installed on the other?
Unfortunately, there are a huge number of configuration options and variables.  Fortunately they are all documented online.
http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
http://dev.mysql.com/doc/refman/5.7/en/server-options.html
http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html
0
 

Author Comment

by:projects
ID: 40348695
As far as I can tell, the only difference in terms of what's installed would be the time zone files which are installed by default anyhow.

Since this question isn't helpful as it is, I will try to get more info from him. His reply to me at this moment is very ambiguous so I'll get more info and update.
0
 
LVL 58

Assisted Solution

by:Gary
Gary earned 250 total points
ID: 40349074
Just to be sure in the /usr/share/zoneinfo directory do you have the timezone files and nothing else?
0
 

Author Comment

by:projects
ID: 40351028
Not sure what nothing else means but yes, both servers seem to have their zone files and nothing else that I can see.
0
 

Author Comment

by:projects
ID: 40397376
The programmer is gone and I have no way of knowing why he needed or used this. I will need to ask the next programmer to find out why and change this so it is not needed.

Not sure how to close this now useless question.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating and Managing Databases with phpMyAdmin in cPanel.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question