Opened 10 years ago
Last modified 10 years ago
#23852 closed Bug
Timezone works inconsistently under Cygwin and Windows — at Version 1
Reported by: | wlnirvana | Owned by: | nobody |
---|---|---|---|
Component: | Core (Management commands) | Version: | 1.6 |
Severity: | Normal | Keywords: | timezone |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Environment: Win 7 (64-bit) + Cygwin (64-bit) + Django 1.6.5
Current time in Windows system: 2014-11-17 16:25 HKT
If I create a project and run it under Cygwin, I get the following
$ django-admin.py startproject foobar $ cd foobar/ $ python manage.py runserver Validating models... 0 errors found November 17, 2014 - 08:26:10 Django version 1.6.5, using settings 'foobar.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C.
Note the time is around 8:30 in the morning!!!
And if I switch to Windows and run the exact same project I just created, I get:
D:\cygwin64\home\Administrator\foobar>python manage.py runserver Validating models... 0 errors found November 17, 2014 - 16:29:10 Django version 1.6.5, using settings 'foobar.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK.
This time it correctly shows the local time.
EDIT:
Here is an excerpt of settings.py
generated by django-admin.py startproject foobar
command.
TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True
Note:
See TracTickets
for help on using tickets.