From 842308c06efa4b80336bd5387f752ce42f663893 Mon Sep 17 00:00:00 2001 From: Justin <14909116+ThatGuyJustin@users.noreply.github.com> Date: Wed, 1 May 2019 18:45:16 -0400 Subject: [PATCH] Adding @cached_property to Timestamps --- disco/types/user.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/disco/types/user.py b/disco/types/user.py index a971fc4..c91a4ea 100644 --- a/disco/types/user.py +++ b/disco/types/user.py @@ -93,9 +93,11 @@ class Timestamps(SlottedModel): start = Field(int) end = Field(int) + @cached_property def start_time(self): return datetime.utcfromtimestamp(self.start / 1000) + @cached_property def end_time(self): return datetime.utcfromtimestamp(self.end / 1000)