-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Add timestamp method+test; closes #17329 #17906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
f9e2ad5
aa7b06d
4155b03
c73c2fe
66d4a2b
54ebd13
a88419d
49accab
698e688
5eed82b
715b740
b7747ec
237be98
a775671
8f6d8d5
580a1c6
7992462
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1093,7 +1093,7 @@ def test_timestamp(self): | |
|
||
if PY3: | ||
dt = ts.to_pydatetime() | ||
assert dt.timestamp() == ts.timestamp() - ts.nanosecond | ||
assert dt.timestamp() == round(ts.timestamp(), 6) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do you need to round? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. exactly, you should not need to do this |
||
|
||
|
||
class TestTimestampNsOperations(object): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this not available in py2? on datetime?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. The method was added to the stdlib datetime.datetime in py3.3