mysql persistent connection with predefined timezone

237
June 13, 2017, at 00:17 AM

I have ready phalcon application poorly designed with saving time references.

I don't wish to go in details about the design, what is done is done...

The easiest solution to go around this is to set a new mysql connection when user with specific timezone connects and to executing SET time_zone before the actual query. After this query connection is being closed.

Those specific queries happens relatively rare so it is not so big problem, however creating new connection every time takes some CPU. So I was wondering can I create new persistent connection with predefined timezone and only to provide them on request?

I wonder does the persistent connection keeps the information about the set timezone... I guess I can find out by hit and trial but anyway, perhaps someone already tested this one?

Thank you very much!

READ ALSO
Sql Command error on C# Winforms

Sql Command error on C# Winforms

Im trying to copy a table structure in winforms app in C# and i always gets the error invalid syntax which is explained below : This is my code

261
How can I put two queries in one mysql_query?

How can I put two queries in one mysql_query?

I'm trying to do something like this:

168
Database for event ticketing system

Database for event ticketing system

I want to design an event ticketing system which Database is best suited for such requirement? Each event can have location details, tags, description, start/End date, multiple imagesEach event will have attendees

208