Bug 6379

Summary: RuntimeWarning: DateTimeField received a naive datetime while time zone support is active
Product: [Build System, Metadata & Runtime] Toaster Reporter: Ionut Chisanovici <ionutx.chisanovici>
Component: toasterAssignee: Alexandru Damian <alexandru.damian>
Status: VERIFIED FIXED QA Contact: Ionut Chisanovici <ionutx.chisanovici>
Severity: normal    
Priority: Medium CC: alexandru.damian, belen.barros.pena, bluelightning, bogdanx.a.voiculescu, cristiana.voicu, jessica.zhang
Version: 1.7   
Target Milestone: 1.7   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ionut Chisanovici 2014-05-28 12:05:53 UTC
Hi guys,

While doing the performance script for toaster, the part for toaster urls load time, I have discovered that when I'm trying to load 'http://localhost:8000/gui/build/1/target/1/packagefile/1', I get the following warning generated by the script:

/usr/lib/python2.7/site-packages/django/db/models/fields/__init__.py:827: RuntimeWarning: DateTimeField received a naive datetime (2014-05-28 00:00:00) while time zone support is active.
  RuntimeWarning)

Investigating this, I have discovered that this warning is generated by the toastergui/views.py file when the above url is requested.

What I did to check this was:
1. source toaster stop
2. rm -rf toaster_web.log
3. source toaster start
4. tail -f toaster_web.log
5. open/request the above url via browser

We need to fix this issue as the perf script which is implemented as manage.py command will cover that warning as well.

Cheers,
Ionut C
Comment 1 Alexandru Damian 2014-06-24 12:45:24 UTC
Fixed, pending review submission.
Comment 2 Alexandru Damian 2014-08-08 14:38:17 UTC
Fixed, merged. QA, please verify and close.
Comment 3 Ionut Chisanovici 2014-09-03 11:29:30 UTC
Verified