0

I have an accounts page which lets you put in a DateTime as follows:

<input type="date" class="form-control" placeholder="Date" name="date" autocomplete="off" required>
<input type="time" class="form-control" placeholder="Time" name="time" autocomplete="off" required>

When the form is submitted, I want to convert them from PST (which is what they were entered in) to UTC (what my backend is in). How can I do this? Thanks!

  • https://stackoverflow.com/questions/48848628/python-convert-pst-time-to-utc-isoformat adapt this to your view – JSRB Jul 02 '20 at 19:12
  • Does the ```dataparser``` work with all ```pytz``` timezones? –  Jul 02 '20 at 19:26
  • I dont know, I just searched for a duplicate question... and you particularly asked for PST/UTC^^ – JSRB Jul 02 '20 at 19:27

0 Answers0