-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Timestamp(foo) vs to_datetime(foo) #17697
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
Comments
xref to #13712 these I suppose should parse the same. but this is quite tricky. should these be given pytz or dateutil stamps? we prob have a hardcoding somewhere. also |
I'm partial to
It looks like |
I agree it would be nice they give the same result, but I am not sure the fixed offset behaviour of This is also not only the behaviour of |
Do you mean you would prefer something other than
Fair point. How about a proof of concept that unifies the implementations and we'll see if that causes any test failures, then reevaluate. |
This came up when I was looking at a) changing these existing tests to use the Timestamp constructor and The idea here is that |
As long as there are other tests for
do you mean |
In this case the tests I'm referring to specifically use |
The more I think about it, the more unsettling the behavior of
strikes me as distinctly less correct than returning a tz-aware |
You are correct, but still the question is: what to return instead and how much user code will this break?
I don't really know, I only know that often I don't want a
|
Seems like 3 cases: Implementing this will be a minor hassle, but I'm bothered enough by this behavior to volunteer.
That I have no idea. How would we go about figuring this out? |
Two more mismatched cases: "today" and "now". to_datetime goes through the iso8601 parser, while Timestamp goes through the datetime.now/datetime.today calls:
|
I assumed that these should be the same:
Is the mismatch intentional?
The text was updated successfully, but these errors were encountered: