A
A
Alexander Urich2017-09-24 23:08:38
MySQL
Alexander Urich, 2017-09-24 23:08:38

How to select data from MySQL by date given offset?

There is a task of sending mailings by time but taking into account the time zone.
That is, the admin creates a task, enters the date, time and time zone for sending the newsletter (for example, January 29, 2018 at 21:15 in the Europe / Moscow time zone and another task is already in Asia / Ekaterinburg)
How to store it correctly and how to choose the right one later, taking into account the timezone?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya Gerasimov, 2017-09-24
@Urichalex

Store in one UTC format (for example), before adding a task to the database, convert the date to our format

P
Peter, 2017-09-25
@petermzg

Vladimir Rudnykh, Technical Manager of the Mail.Ru Calendar on Habré wrote a good article on this topic.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question