arrow
arrow copied to clipboard
format XSSS outputs too many digits and a dot
Issue Description
New release changed the behaviour of .format('XSSS'), for example:
on 0.17.0 arrow.utcnow().format('XSSS') yields '1614555372217'
on 1.0.2 it yields '1614556907.369226369'
System Info
- 🖥 OS name and version: macOS 10.15.7 (visible also on ubutnu and windows)
- 🐍 Python version: 3.7.10
- 🏹 Arrow version: 1.0.2
Hi @mpnowacki-reef I don't think this is bug however it seems we did forget to mention the changes to the "X" token in the migration guide.
In 1.0.2.
>>> import arrow
>>> dt=arrow.utcnow()
>>> dt.format("X")
'1614632655.629982'
To get a microsecond timestamp.
>>> dt.format("x")
'1614632655629982'
However we may need to review this decision.