S
S
SpiritSound2016-05-06 12:19:08
Programming
SpiritSound, 2016-05-06 12:19:08

How should statistics be synchronized by date with different time zones?

Hey!
A very difficult task has arisen:
We have a service that shows statistics by date. The statistics displays certain data for our time zone.
We collect this statistics from different sources that have different time zones, or even it is not known at all which zone at all (Let's say the zone is known). This is from -12 to +12.
For example, there are a dozen sources with data (for example, these are "Views") and everywhere there are different time zones.
We can request data only by date (yesterday, today, tomorrow).
We carry data once an hour, but sometimes something will not work or the source will fail, in general, different problems.
What is the best way to accomplish this task? Perhaps some of you have encountered this problem and solved it in your own way.
PS I am attaching the data for an example:
d59413e481564b418ccfca2156016980.jpg
Days are marked with flowers. We only know our time, and we do not know the time of the service and its time zone. Therefore, the time at the source is purely for example.
And there will be a lot of such data from sources, and all will have different time zones from -12 to +12.
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
axeax, 2016-05-06
@axeax

If data can only be requested by date (yesterday, today, tomorrow), why not save this data simply as GMT+0 ? And give back as needed. Or I misunderstood something. Can you give a more or less similar example of statistics? (what kind of data)

V
Vladislav, 2016-05-07
@bizobj

Here's an interesting question. It would seem that the solution should not depend on the subject area and will be purely technical. But if you carefully understand, then here it is also important to understand the subject matter. Here are two different options that come to mind right off the bat.
The first case: we need to compare user behavior for different time zones. What users prefer in the morning and what in the evening. Then we do not have to take into account the time offset in time zones. After all, we need to equalize all user activities according to "their" time zone. In other words, we combine and analyze local time.
The second case: we need to understand the load on our site (project) by the time of its location.Then we really need to know the local time from which the activity comes and the time shift relative to the place where our site (project) works.
So it's not easy...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question