Solved

mysql CONVERT_TZ null centos

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

919 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

18 Experts available now in Live!

Get 1:1 Help Now