def test_to_gmt(self): """ Test for converting to GMT. """ gmt = pytz.timezone('GMT') current_datetime = datetime.datetime.now(tz=gmt) gmt_datetime = to_gmt(current_datetime) self.assertEqual(current_datetime, gmt_datetime)
def time_last_updated_gmt(self): return to_gmt(self.last_modified_at)
def time_gmt(self): return to_gmt(self.created_at)
def expires_at(self): return to_gmt(self.created_at + self.edit_timeout)