Skip to content
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

Timestamp doesn't correctly localize datetime.date #2993

Closed
petergx opened this issue Mar 9, 2013 · 2 comments
Closed

Timestamp doesn't correctly localize datetime.date #2993

petergx opened this issue Mar 9, 2013 · 2 comments
Milestone

Comments

@petergx
Copy link

petergx commented Mar 9, 2013

In 0.10.1, Timestamp constructor seems to have an issue localizing datetime.date objects.

In [19]: import datetime

In [20]: datetime.date(2013, 3, 9)
Out[20]: datetime.date(2013, 3, 9)

In [21]: d=datetime.date(2013, 3, 9)

In [22]: Timestamp(d, tz='US/Pacific') == Timestamp(d).tz_localize('US/Pacific')
Out[22]: False

In [23]: Timestamp(d, tz='US/Pacific')
Out[23]: <Timestamp: 2013-03-08 16:00:00-0800 PST, tz=US/Pacific>
@waitingkuo
Copy link
Contributor

The constructor of Timestamp accidentally does different jobs for datetime.date and datetime.datetime I've solved it, and sent a pull request

@ghost
Copy link

ghost commented Mar 21, 2013

PR merged, fixed in master with 2998540.

@ghost ghost closed this as completed Mar 21, 2013
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants