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

Add timestamp to storage API #123

Closed
dcramer opened this issue Apr 27, 2011 · 7 comments
Closed

Add timestamp to storage API #123

dcramer opened this issue Apr 27, 2011 · 7 comments

Comments

@dcramer
Copy link
Member

dcramer commented Apr 27, 2011

No description provided.

@mfrasca
Copy link
Contributor

mfrasca commented Apr 28, 2011

you might want to have a look at mfrasca/djang-sentry@35ba710d0d0db60dde0667922cff2770adf6a378

@mfrasca
Copy link
Contributor

mfrasca commented Apr 28, 2011

you might want to have a look at mfrasca/django-sentry@35ba710d0d0db60dde0667922cff2770adf6a378

@dcramer
Copy link
Member Author

dcramer commented Apr 29, 2011

@mfrasca was that just so it could be specified?

I realized that that was going to be a problem after I made those changes. Going to have to look into why TIME_ZONE wouldn't work right with just datetime objs (maybe it needs to use utcnow(), but im not sure that works in all SQL engines)

@mfrasca
Copy link
Contributor

mfrasca commented Apr 29, 2011

what problems are you observing with TIME_ZONE?

@mfrasca
Copy link
Contributor

mfrasca commented Apr 29, 2011

I'm reading from this one
http://www.postgresql.org/docs/8.0/static/datatype-datetime.html
and thinking aloud...

  • in SQL, timestamps may have a time zone property.
  • if you convert timestamp with time zone to datetime, you get a non injective function.
  • if you want to convert datetime to timestamp with time zone, you need choose the time zone for the timestamps.
  • if we use timestamp without time zone and make sure we are using UTC, things should go fine.

so I'm changing the default from datetime.now to datetime.utcnow.

@dcramer
Copy link
Member Author

dcramer commented Apr 29, 2011

Ya I think that's the right change -- need to confirm that wont impact other DB backends (I'll probably just see what auto_now_add does in Django). Gonna get this taken care of this weekend for sure.

@dcramer
Copy link
Member Author

dcramer commented May 14, 2011

Marking this as fixed

@dcramer dcramer closed this as completed May 14, 2011
@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants