Jump to content

Error about timezone


dianepep

Recommended Posts

I am getting this error in my logs:

File: [controller.admin.pre_session.inc.php] Line: [26] "SET @@time_zone = 'America/New_York'" - Unknown or incorrect time zone: 'America/New_York'

I've read some previous threads about this and am I correct in believing it is my hosting company that needs to make a change in the mysql?  If so, can someone give me a little more detail of what exactly I can say to them since I really don't understand any of this? My hosting company was just taken over by someone else and the customer service is horrible. I called last week because my site http was not redirecting to https and the guy on the phone told me "so just don't type http" and refused to talk to me about it any further. I want to try to understand what I'm talking about before I call them. Thanks ahead of time for help!

p.s. Does this error really effect anything? I'm having an issue with my reviews not showing and have been trying to find the problem and thought maybe this error has affected that?

 

Link to comment
Share on other sites

Telling the database server what time zone to use is an effort to match the time/date of what is happening in the PHP script with some queries that use the time/date of what the database server is using for your connection sessions. Without this syncing, some actions may happen a few hours too early or too late, or doing some debugging or other analysis may be off a bit.

https://dev.mysql.com/doc/refman/5.7/en/mysql-tzinfo-to-sql.html

I do not have the correct argument to justify the importance of getting these timezone tables loaded. I just know that it solves a few (perhaps obscure) problems.

The error is not dangerous. CubeCart has been operating for many years across many versions with the time not synced between PHP and the database server.

Link to comment
Share on other sites

You could ask your server hosting company to run the following command from a terminal window

# mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p (root password goes here)

However, this would affect every other customer on your shared server, so in all likleyhood, they probably won't, and If your host is someone like GoDaddy, then don't even bother asking.

The only other suggestion would be to disable the timezone in your cart store settings.

The errors will probably go away, but the time stamps on your orders might be wrong, this depends on what the server time is.

 

Link to comment
Share on other sites

I've just done an upgrade from a very early v6.1.x to latest 6.2.8 and I found I had this error, I changed the following to cure it:- 

Store settings > Advance > Time zone 

and changed the timezone from London/Europe to disabled and the errors stopped. fortunately my server is on the correct time. 

 

I wonder if the UTC offset box above will adjust it if the time is out? i have that box blank. list of off sets can be found here https://en.wikipedia.org/wiki/List_of_UTC_time_offsets 

Link to comment
Share on other sites

I'm sorry it took me so long to reply to everyone. I've been trying to understand what i need to do to correct this issue and researching. 

If this error can mess up when certain things happen, maybe that is why I am not getting an update POST from paypal updating my 'pending' to 'processed' when payment is made. 

Bsmither.. thanks for the link. I read it and didn't understand any of it but I will reread it again later and see if I can understand how to correct it. 

Iant...Does disabiling it correct all errors or is it possible that things won't 'sync' correctly for you?

One thing I find odd in the Admin Panel where you choose your time zone.. there are bizarre listings for America/Montreal, America/Buenos Aires, America/Port-of-Spain, etc... But no America/A valid state except for America/New-York. Any ideas what's going on?

Link to comment
Share on other sites

PHP can't list every major city in the world. So, only super-major cities that represent the timezone is listed by PHP. When a group starts with America, PHP is referring to all of the American continents -- North, Central, and South. New York is referring to NYC. Chicago, Denver, and Los Angeles are representative of North American timezones.

Link to comment
Share on other sites

3 hours ago, dianepep said:

Iant...Does disabiling it correct all errors or is it possible that things won't 'sync' correctly for you?

Disabling it that way simply stops the errors it doesnt "fix" the problem which can only be done by the server administrator running the command that Keat gave earlier.  We run this as part of our server build on every server we run 😀

Link to comment
Share on other sites

  • 1 month later...
12 minutes ago, mitekcomputers said:

All I did to solve this was go to Admin>Store Settings> Advanced>  I then disabled teh default timezone and then set JUST the UTC offset to -0.400 which is EST/DST in my case. Problem solved. Immediately.

Mike

That doesnt "solve" the problem just avoids the error message

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...