Пример #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
Пример #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);
Пример #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);
Пример #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);
Пример #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);