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
diff --git a/crashreports/serializers.py b/crashreports/serializers.py
index dffce56..4d88163 100644
--- a/crashreports/serializers.py
+++ b/crashreports/serializers.py
@@ -1,3 +1,4 @@
+from django.utils import timezone
 from rest_framework import serializers
 from rest_framework.exceptions import NotFound
 from crashreports.models import Crashreport
@@ -31,6 +32,7 @@
     uuid = serializers.CharField(max_length=64)
     id = PrivateField()
     device_local_id = serializers.IntegerField(required=False)
+    date = serializers.DateTimeField(default_timezone=timezone.UTC())
 
     class Meta:
         model = Crashreport
@@ -53,6 +55,7 @@
     uuid = serializers.CharField(max_length=64)
     id = PrivateField()
     device_local_id = serializers.IntegerField(required=False)
+    date = serializers.DateTimeField(default_timezone=timezone.UTC())
 
     class Meta:
         model = HeartBeat
@@ -79,6 +82,8 @@
 
 class DeviceSerializer(serializers.ModelSerializer):
     permission_classes = (permissions.IsAdminUser,)
+    board_date = serializers.DateTimeField(default_timezone=timezone.UTC())
+    last_heartbeat = serializers.DateTimeField(default_timezone=timezone.UTC())
 
     class Meta:
         model = Device