Esempio n. 1
0
 def update_archived_flag(self):
     "Updates the 'Archived' flag, depending if the the end date is set or not"
     utc = utils.localize_to_utc(datetime.utcnow())
     if self.get_date_time_end_utc():
         self.archived = self.get_date_time_end_utc() < utc
     else:   
         self.archived = self.get_date_time_begin_utc() + timedelta(hours=1) < utc
Esempio n. 2
0
 def get_date_time_end_utc(self):
     "Gets the 'End' date/time in UTC."
     return utils.localize_to_utc(self.date_time_end);
Esempio n. 3
0
 def get_date_time_modified_utc(self):
     "Gets the 'Modifed' date/time in UTC."
     return utils.localize_to_utc(self.date_time_modified);
Esempio n. 4
0
 def get_date_time_begin_utc(self):
     "Gets the 'Begin' date/time in UTC."
     return utils.localize_to_utc(self.date_time_begin);
Esempio n. 5
0
 def get_date_time_created_utc(self):
     "Gets the 'Created' date/time in UTC."
     return utils.localize_to_utc(self.date_time_created);