I have configured timezone in Django 1.8 (my current timezone is UTC+1 or BST):
TIME_ZONE = 'Europe/London'
USE_I18N = True
USE_L10N = True
USE_TZ = True
I have timestamp attribute in my model:
class NodeGPS(models.Model):
node_id = models.ForeignKey(Node)
timestamp = models.DateTimeField(auto_now_add=True, auto_now=False)
gps_latitude = models.FloatField(null=True, blank=True)
gps_longitude = models.FloatField(null=True, blank=True)
I have Django Rest Framework 3.4.0, so when I post data through DRF web interface timestamp is set to UTC automatically, which is 1 hour back from my current time (UTC+1). However, in PostgreSQL timestamp field is set as UTC+1. But on DRF web interface it always shows time in UTC.
What a weird behaviour. What is a reason for that?
Thanks in advance for any suggestions!