arrow-py / arrow

🏹 Better dates & times for Python
https://arrow.readthedocs.io
Apache License 2.0
8.64k stars 667 forks source link

weird behavior difference: arrow.utcnow().timestamp and arrow.utcnow().timestamp() #1082

Closed Distortedlogic closed 2 years ago

Distortedlogic commented 2 years ago

I have two screenshots of running arrow.utcnow().timestamp and arrow.utcnow().timestamp() both on google colab and a local jupyter lab instance. On google collab, arrow.utcnow().timestamp() returns as expected, and as per the arrow docs. On the jupyter lab instance, arrow.utcnow().timestamp() raises TypeError: 'int' object is not callable and arrow.utcnow().timestamp returns the expected value as an int.

Google Colab with expected behavior, Python 3.7.12 11-01-2022-10-31-04

Jupyter Lab with unexpected behavior, Python 3.9.7 11-01-2022-10-31-28

Jupyter version info 11-01-2022-10-36-37

System Info

Distortedlogic commented 2 years ago

Upon further investigation, it appears this is an OS difference. I ran the same lines of arrow in the python interpreter on my windows machine to one result and in a linux docker container to a different result replicating the scenario above with linux producing the expected behavior.

On windows 11-01-2022-11-09-56

On linux in docker 11-01-2022-11-05-29