The current timestamp of the metrics, which are logged, should be saved in a new column.
These column contains the unix timestamp (milliseconds since 1970.01.01).
Benefit of this approach:
- the timezone are omitted and the timestamps are plain UTC timestamps so the server can convert them from and into this timestamp, since he knows his current timezone.
- calculation of the intervals with this kind of timestamps is much easier, since we don't have to use the database specific time functions