title: How to convert TimeField to time stamp
body: <p>Here is a curve ball: How do you convert user input (say, 10:30) to a time stamp? The docs say that the default input format is %H: %M.  So, the form is validated on the TimeField.  But, we all know that 10:30 is ambiguous.  Given that TimeField is translated to "timestamp with time zone NOT NULL" in Postgres, we need to build a timestamp.</p>
  
  <p>I have tried to build a timestamp by:</p>
  
  <pre><code>event_date = datetime.date(the_year, the_month, the_day) # Naive date
  event_time = instance.time # Naive time, datetime.time object
  event = datetime.datetime.combine(event_date, event_time) # Naive datetime object
  </code></pre>
  
  <p>when I try to save event to Postgres, it gives me the error:</p>
  
  <pre><code>invalid input syntax for type timestamp with time zone: "10:00:00"
  </code></pre>
  
  <p>I have also tried to create a time-aware object:</p>
  
  <pre><code>the_time = pytz.timezone("UTC").localize(instance.time, is_dst = None) # the_time is an aware object
  </code></pre>
  
  <p>but, Django raises an Exception ValueError:</p>
  
  <pre><code>Django does not support timezone-aware times
  </code></pre>
  
  <p>Then, I tried to create a datetime.datetime object with timezone:</p>
  
  <pre><code>event_aware_datetime = datetime.datetime(the_year, the_month, the_day, instance.time.hour, instance.time.minute, instance.time.second, tzinfo = pytz.utc)
  </code></pre>
  
  <p>But, Django raises the familiar exception DataError:</p>
  
  <pre><code>invalid input syntax for type timestamp with time zone: "10:00:00"
  </code></pre>
  
  <p>I have tried saving datetime.datetime.now() as the time, and it works!  But, that is not what the program logic calls for. I am out of tricks!  I just want the app to provide a time field where the user can specify the time for an event, simple enough! The program should take care of the rest, e.g. creating the timestamp from the time and date, and save that in the Postgres database.</p>
  
  <p>Given the amount of time I spent researching all modules, datetime, time, pytz, timezone, etc. I take my hat off for anyone who can shed light on this dark side of Django.</p>