Djangoのタイムゾーンサポートについてメモ。settings.USE_TZをTrueにすると有効になる。 試したのはPython 2.7, Django 1.6.2。 Django1.6だと、プロジェクト新規作成時のsettings.pyでUSE_TZはTrueに設定されている。(ドキュメントではデフォルトでは無効と書かれてることに注意。django.conf.global_settings.USE_TZはFalse) settings.USE_TZがTrueのとき タイムゾーンサポートが有効になっていると、django.utils.timezone.nowはtzinfoにsettings.TIME_ZONEで設定したタイムゾーンのオブジェクトが指定された現在日時(datetimeオブジェクト)を返す。 >>> import django.utils.timezone as timez