code: def formatTime(t):
      
      if isinstance(t, float):
          return datetime.utcfromtimestamp(t).strftime(timeFormat)
      if isinstance(t, datetime):
          return t.strftime(timeFormat)
docs: Properly Format Time for permlinks