Hello,

I wasn't sure how to tackle this so I decided to post here first.

I'm working on Django 1.4.2 now, and I encountered the following problem:

   1. I have a model form with datetime fields
   2. I run my tests and feed the form with POST data using RequestFactory
   3. The datetimes in the POST are created using timezone.now() (and I 
   have USE_TZ = True)
   4. In my clean_<fieldname> method the cleaned value is the correct UTC 
   datetime BUT the tzinfo part is actually representing the user timezone, 
   thus the value is off by the TZ offset
   5. The raw POST value is correct: self.data['fieldname'] contains the 
   +00:00 tz offset, so it doesn't seem to be a RequestFactory issue

I'm wondering if someone encountered this issue before, or if there is 
already a ticket submitted. I personally failed to find one, but maybe I 
just suck at searching Trac. 
If there is no ticket, I would like to submit one with more details and 
examples and of course will try to create some tests to reproduce it, but I 
would like to get some mentoring from the more experienced contributors on 
what steps to take.

Thanks,
Ion



-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-developers/-/ynBczk8Rn0cJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to