Set the default timezone to UTC for every incoming timestamp

The API does not define a specific timezone from which the timestamps
are originating. The server always assume its own timezone to be the
reference which could cause issues when dealing with daylight time
saving jumps. E.g. when switching from CET to CEST, one hour is
"skipped"; and conversely, when switching back to CET from CEST, one
hour is "replayed". This behaviour would cause the framework to raise
pytz.NonExistentTimeError and pytz.AmbiguousTimeError, uncaught
exceptions that finally resolve in an internal server error (HTTP 500).

This patch explicitly uses the UTC timezone for all incoming timestamps
to sanitise them once and for all and not rely on the default server
timezone.

HIC-99

Change-Id: I0ac8aa15e904e06fb6a8b8ff1dc5580de81e2cd2
1 file changed