#23852: Timezone works inconsistently under Cygwin and Windows
-------------------------------------+-------------------------------------
     Reporter:  wlnirvana            |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Core (Management     |                  Version:  1.6
  commands)                          |               Resolution:
     Severity:  Normal               |             Triage Stage:
     Keywords:  timezone             |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by wlnirvana):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Old description:

> 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.

New description:

 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
 }}}

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23852#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.3451131591521486f4f06bf9e9efb971%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to