Solved

mysql CONVERT_TZ null centos

Posted on 2014-09-28
5
162 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 108

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
htacces issue 2 39
Router for PHP reqeusts 12 32
Wordpress update causing pages to crash 1 18
Converting SQL server date to string 3 15
This article discusses four methods for overlaying images in a container on a web page
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to dynamically set the form action using jQuery.
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.

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now