code: def fromtimestamp(cls, t, tz=None):
          
  
          _check_tzinfo_arg(tz)
  
          converter = _time.localtime if tz is None else _time.gmtime
  
          t, frac = divmod(t, 1.0)
          us = int(frac * 1e6)
  
          # If timestamp is less than one microsecond smaller than a
          # full second, us can be rounded up to 1000000.  In this case,
          # roll over to seconds, otherwise, ValueError is raised
          # by the constructor.
          if us == 1000000:
              t += 1
              us = 0
          y, m, d, hh, mm, ss, weekday, jday, dst = converter(t)
          ss = min(ss, 59)    # clamp out leap seconds if the platform has them
          result = cls(y, m, d, hh, mm, ss, us, tz)
          if tz is not None:
              result = tz.fromutc(result)
          return result
docs: Construct a datetime from a POSIX timestamp (like time.time()).
  
          A timezone info object may be passed in as well.