code: def utcfromtimestamp(cls, t):
          "Construct a UTC datetime from a POSIX timestamp (like time.time())."
          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 = _time.gmtime(t)
          ss = min(ss, 59)    # clamp out leap seconds if the platform has them
          return cls(y, m, d, hh, mm, ss, usf utcfromtimestamp(cls, t):
          "Construct a UTC datetime from a POSIX timestamp (like time.time())."
          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 = _time.gmtime(t)
          ss = min(ss, 59)    # clamp out leap seconds if the platform has them
          return cls(y, m, d, hh, mm, ss, us)
docs: Construct a UTC datetime from a POSIX timestamp (like time.time()).