Django DateTime field to generate timestamp fields withOUT timezone -
I am working on a Django application where I need all postgres which are dated to be saved in UTC Represents the field (as they should). When I am modeling with the datetime field, those databases are represented in the form of " timestamp with time zone ". Although I can manually change the tables to remove the timezone from the field, I was wondering if there is the ability to do this in the Datetime model field - i.e., "Timestamp with time zone for some time" Build the farm. Is this possible? Or do I have to change their tables? Data type string for postgres in Dano map, literally, As far as I know, you have three options: Take advantage of the DJ's hooks for execution. To do this, create a directory named Type a custom field to define a modifier for the timestamp field as you see fit. As soon as you leave the Diego field, and make a timezone conversion in your application so that you are absolutely right that you are passing the right time. My personal priority for data integrity is # 3 with just character encoding, where you always want to make sure that you know charsets and handle conversion properly I am more comfortable with dates / time, whose properties (including TZs) are properly defined because they can be. You can be sure today that all of your input is already coming to UTC, but this can change, especially if the timestamps are provided by end users, what is the cost of it, I want to go the extra mile, the timestamp in the app I will change it in UTC, and will store it in DB with UTC as the time zone. timestamp with time
sql
in your app and a file from that file called mymodel.postgres_psycopg2.sql
. Place your alert table statements there.
Comments
Post a Comment