﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36078	Postgres date and time range fields change after saving object	Mapiarz		"This short test exemplifies the problem:


{{{
now = timezone.now()
empty_range = psycopg2_range.DateTimeTZRange(empty=True)

test_model = TestModel(range=psycopg2_range.DateTimeTZRange(now, now))

self.assertFalse(test_model.range.isempty)
self.assertNotEqual(test_model.range, empty_range)

test_model.save()
test_model.refresh_from_db()

self.assertTrue(test_model.range.isempty)
self.assertEqual(test_model.range, empty_range)
}}}

I would expect the field value not to change after saving, and it should continue to have the lower, upper and boundary fields set.

Repro project: https://github.com/Mapiarz/django_postgres_range_repro/tree/master

The example is for DateTimeRange, but DateRange Is also affected. Other ranges possibly too, I haven't tested."	Bug	new	contrib.postgres	4.2	Normal		postgres		Unreviewed	0	0	0	0	0	0
