Bug 701807 - Incorrect timezone setting: America/NewYork
Incorrect timezone setting: America/NewYork
Product: Fedora
Classification: Fedora
Component: cobbler (Show other bugs)
All Linux
unspecified Severity high
: ---
: ---
Assigned To: James C.
Fedora Extras Quality Assurance
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2011-05-03 18:04 EDT by Jacob Hunt
Modified: 2012-04-16 20:45 EDT (History)
11 users (show)

See Also:
Fixed In Version: 2.2.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-04-16 20:45:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
settings.py patch (282 bytes, patch)
2011-05-03 18:04 EDT, Jacob Hunt
no flags Details | Diff

  None (edit)
Description Jacob Hunt 2011-05-03 18:04:25 EDT
Created attachment 496649 [details]
settings.py patch

Description of problem:

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Install and configure cobbler and cobbler-web
2. With a browser go to the webui "http://localhost/cobbler_web/"

Actual results:

You get the following mod_python error:

ProcessId:      6543
Interpreter:    ''

ServerName:     ''
DocumentRoot:   '/var/www/html'

URI:            '/cobbler_web/'
Location:       '/cobbler_web'
Directory:      None
Filename:       '/var/www/cobbler_web'
PathInfo:       '/'

Phase:          'PythonHandler'
Handler:        'django.core.handlers.modpython'

Traceback (most recent call last):

  File "/usr/lib64/python2.7/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)

  File "/usr/lib64/python2.7/site-packages/mod_python/importer.py", line 1229, in _process_target
    result = _execute_target(config, req, object, arg)

  File "/usr/lib64/python2.7/site-packages/mod_python/importer.py", line 1128, in _execute_target
    result = object(arg)

  File "/usr/lib/python2.7/site-packages/django/core/handlers/modpython.py", line 213, in handler
    return ModPythonHandler()(req)

  File "/usr/lib/python2.7/site-packages/django/core/handlers/modpython.py", line 174, in __call__

  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 39, in load_middleware
    for middleware_path in settings.MIDDLEWARE_CLASSES:

  File "/usr/lib/python2.7/site-packages/django/utils/functional.py", line 276, in __getattr__

  File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 42, in _setup
    self._wrapped = Settings(settings_module)

  File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 125, in __init__
    raise ValueError("Incorrect timezone setting: %s" % self.TIME_ZONE)

ValueError: Incorrect timezone setting: America/NewYork

Expected results:

To have access to the webui

Additional info:

The timezone setting is incorrect in /usr/share/cobbler/web/settings.py, it should be America/New_York.  Once that is corrected the webui functions as expected.
Comment 1 Max E 2011-12-02 11:11:33 EST
I can also confirm that this problem occurs in RHEL 5.7 / Centos 5.7 as well with Python 2.4.  I 'fixed' the problem by changing /usr/share/cobbler/web/settings.py changing America/NewYork with America/New_York - however, to also try and get around the problems, I went to the type zones file in /usr/share/zoneinfo and went into America and performed ln -s New_York NewYork   . This seems to get around any odd problems where the reference to NewYork is still made.  A small typo - really needs to be fixed.
Comment 2 Nico Kadel-Garcia 2012-03-03 10:54:17 EST
It's still broken, in EPEL releases and Fedora 16. Here are my patches for the .spec file to fix this, some inappropriate reports about duplicated files in RPM compilation, and some permission errors for the web components. I'll submit separate bugs for those if necessary.

$ diff -u cobbler.spec  cobbler-fixed.spec
--- cobbler.spec        2011-09-09 16:01:55.000000000 -0400
+++ cobbler-fixed.spec  2012-03-03 10:51:44.462630731 -0500
@@ -94,6 +94,9 @@
 %setup -q

+# Fix timezone default
+%{__sed} -i.timezone  's|America/NewYork|America/New_York|g' web/settings.py
 %{__python} setup.py build

@@ -468,16 +471,18 @@
 Web interface for Cobbler that allows visiting http://server/cobbler_web to configure the install server.

 %files -n cobbler-web
+%config(noreplace) /etc/httpd/conf.d/cobbler_web.conf
 %dir /usr/share/cobbler/web
-%dir /usr/share/cobbler/web/cobbler_web
-%config(noreplace) /etc/httpd/conf.d/cobbler_web.conf
+# Unnecessary, grabbed by above list
+#%dir /usr/share/cobbler/web/cobbler_web
 %dir /var/lib/cobbler/webui_sessions
 %dir /var/www/cobbler_webui_content

 * Fri Sep  9 2011 Tom Callaway <spot@fedoraproject.org> - 2.0.11-3
Comment 3 Greg Swift 2012-03-16 10:02:23 EDT
This needs to moved to the new issue tracker for cobbler

Comment 4 Fedora Admin XMLRPC Client 2012-04-11 18:00:12 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 5 James C. 2012-04-16 20:45:03 EDT
This was fixed in the 2.2.x series. I'm going to close this issue here, and if it is still a problem please open a new ticket at the github issue tracker Greg posted above.

Note You need to log in before you can comment on or make changes to this bug.