You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to print unix time stamps (time since epoch) with milliseconds precision, there does not appear to be a function for this in the library.
Is there anyway to get a date in milliseconds since epoch?
Activity
sdispater commentedon Jun 15, 2018
The
DateTime.float_timestampproperty gives you a timestamp with milliseconds precision (see https://pendulum.eustace.io/docs/#attributes-and-properties).jgrammen-agilitypr commentedon Jun 15, 2018
that actually gives you the timestamp in microsecond precision, as of the posting of this comment the timestamp since epoch in miliseconds is
which has 13 digits.
the pendulum function in the example returns
which has 16 digits (ignoring the period)
So guess the solution is to multiple by 1000 which gets me miliseconds and then drop everything after the decimal (the microsecond part).