pandas.Timestamp.utcfromtimestamp — pandas 3.0.0.dev0+2099.g3832e85779 documentation (original) (raw)
classmethod Timestamp.utcfromtimestamp(ts)#
Construct a timezone-aware UTC datetime from a POSIX timestamp.
This method creates a datetime object from a POSIX timestamp, keeping the Timestamp object’s timezone.
Parameters:
tsfloat
POSIX timestamp.
See also
Timezone.tzname
Return time zone name.
Return a new Timestamp representing UTC day and time.
Transform timestamp[, tz] to tz’s local time from POSIX timestamp.
Notes
Timestamp.utcfromtimestamp behavior differs from datetime.utcfromtimestamp in returning a timezone-aware object.
Examples
pd.Timestamp.utcfromtimestamp(1584199972) Timestamp('2020-03-14 15:32:52+0000', tz='UTC')