Skip to content

Commit 788321d

Browse files
committed
Added two new methods to TimeSlot: local_start_time() and local_end_time().
- Legacy-Id: 17682
1 parent 2e1e2b7 commit 788321d

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

ietf/meeting/models.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,18 @@ def utc_end_time(self):
532532
return local_end_time.astimezone(pytz.utc)
533533
else:
534534
return None
535+
def local_start_time(self):
536+
if self.tz():
537+
local_start_time = self.tz().localize(self.time)
538+
return local_start_time
539+
else:
540+
return None
541+
def local_end_time(self):
542+
if self.tz():
543+
local_end_time = self.tz().localize(self.end_time())
544+
return local_end_time
545+
else:
546+
return None
535547

536548
@property
537549
def js_identifier(self):

0 commit comments

Comments
 (0)