Alternative to Time Zone Tables for shared hosting

Asked by Bo

Hi!

I'm on shared hosting and the hosting company won't populate the Time Zone Tables. So is there some other way I can achieve this? Like set up an ini-file or hard code it in the source?

Thanks
/Bo

Question information

Language:
English Edit question
Status:
Answered
For:
queXS Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Adam Zammit (adamzammit) said :
#1

Hi Bo,

One user requested this a while ago: https://sourceforge.net/p/quexs/mailman/message/28188785/

This method should still work (copied from the message linked above):

queXS relies on mySQL timezone support and uses the CONVERT_TZ function to produce named timezone compatible queries.

Without the timezone support enabled, all queries to CONVERT_TZ will return NULL (see: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_convert-tz )

It is possible to get the system to work without timezone support - to do so, you will have to do the following:

1. In the queXS code, replace all occurrences of 'UTC' in the CONVERT_TZ MySQL call to something like '+0:00'

2. In all fields in the database that refer to Time_zone_name - replace a named timezone with an offset - such as '+8:00' or whatever the offset is for your timezone. If everything is in the 'System' timezone (i.e. the same as the server) I would suspect this would be '+0:00'. Therefore all database joins that use the Time_zone_name value from the database will also not be named and should succeed.

Revision history for this message
Bo (mrboboz) said :
#2

Thanks!

Will try and get back /Bo

Can you help with this problem?

Provide an answer of your own, or ask Bo for more information if necessary.

To post a message you must log in.