docs: def timestamp2date(tstamp):
      "Converts a unix timestamp to a Python datetime object"
      dt = datetime.fromtimestamp(tstamp)
      if not dt.hour+dt.minute+dt.second+dt.microsecond:
          return dt.date()
      else:
          return dt