I have an edit view for a model Eventwith fields name, start_timeand end_time. My view is a form that looks something like this:
# ...
# form with:
# - event name
# - datetime_select for event start_time (in business local time zone)
# - datetime_select for event end_time (in business local time zone)
Now the problem is: start_timethey end_timehave a time zone attached to it, but this time is lost when we render the view, because datetime_select does not contain a field for the time zone. As a result, we have a “UTC time,” which is actually local time devoid of its time zone.
To repeat, the situation looks like this when we visualize the form in the view, and then immediately submit it without making any changes:
db time: 2011-05-15 @ 1100 UTC
converted to local time: 2011-05-15 @ 0600 CDT
time stored in view: 2011-05-15 @ 0600 UTC (time zone info lost)
time posted back to db: 2011-05-15 @ 0600 UTC
, , , 1100 UTC , 0600 UTC, . .
. ? ( , , - , API.)