I have one Mysql DB with tables which I have to manage the timezone inside the tables.
global.time_zone and session.time_zone are UTC.
I will give a short example of one table that I would like to set some conditions.
I have 5 different "IP":
for example:
'1.1.1.1.1'
'1.1.1.1.2'
'1.1.1.1.3'
'1.1.1.1.4'
'1.1.1.1.5'
I have a column "updated_at" (DateTime)
now, I want to have the conditions below:
- IP 1 = GMT
- IP 2 = GMT+1
- IP 3 = GMT+2
- IP 4 = GMT+3
- IP 5 = GMT+4
So, according to the 'IP' on the table, I'll get the relevant timezone on "updated_at".
Should I manipulate the time only for front, or there is a way to convert the TZ on the table before I'm sending a query? What is the best solution here?
How to deal in the future with DST on/off?
The front is React.js, Backend is Node.js.
Thanks!