models.py DateTime field formatting
|Reported by:||mikewells||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I was just wondering the best way to go about using a model's DateTime field with a specific formatting. eg. (mm/dd/yyyy hh:mm:ss) and nothing else in a postgres database.
The reason for this is because I want to pull data out of the database in that exact format and pass it to a dygraph object that accepts it in that format.
At the moment when I'm adding data using the admin interface its formatting it as (yyyy-mm-dd hh:mm:ss), which wouldn't be that much of a problem to just parse when read out of the database but I am just trying to eliminate this step. Also when looking at the actual data stored in the database (postgres) it is being stored with some offset of +9 hours and some sort of metadata (+2)? eg (2010-07-12 22:49:59+02). I don't wan't any of this... just the date stored as (mm/dd/yyyy hh:mm:ss). How can I accomplish this?