Added datetime_tz.py from google code, which handles all the complexity of detecting a timezone on Linux

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@10543 25043fe6-1616-0410-a82d-ba8f324cfe61
Add Windows support using win32timezone

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@10544 25043fe6-1616-0410-a82d-ba8f324cfe61
Add a localize function, which either adds the local timezone to a naive datetime or converts a non-naive datetime to the local timezone

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@10545 25043fe6-1616-0410-a82d-ba8f324cfe61
Correct typo

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@10546 25043fe6-1616-0410-a82d-ba8f324cfe61
Always use pytz timezones

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@10573 25043fe6-1616-0410-a82d-ba8f324cfe61
All pytz timezones use localize

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@10574 25043fe6-1616-0410-a82d-ba8f324cfe61
Optimize comparisons between timezones. Use common timezones as priority over others. If multiple matches are found to `/etc/localtime`, warn, but still use the first one.

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@10851 25043fe6-1616-0410-a82d-ba8f324cfe61
Add a utility function to strip timezone info from a datetime See #3603

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@11166 25043fe6-1616-0410-a82d-ba8f324cfe61
Add support for looking up non-English time zone names to the windows names, then checking Olsen database. Also, raise a better error if this fails. See #3811

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@11493 25043fe6-1616-0410-a82d-ba8f324cfe61
Moved `win32timezones` into a separate file, and added code that actually generates this file (which can be used to keep up to date; not called by default). See #3811

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@11495 25043fe6-1616-0410-a82d-ba8f324cfe61
Added method for calculating local timezone name, for use as a default column value setter

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@11497 25043fe6-1616-0410-a82d-ba8f324cfe61
Use `Std` rather than `Index` to map the time zone names, and make sure we use the `standardName`. This is tested on an hactual Japanese machine. See #3811 (Also fix the spelling ''Olsen''`->`''Olson'')

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@11503 25043fe6-1616-0410-a82d-ba8f324cfe61
When we localize, make sure we always return a datetime_tz for consistency

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@12719 25043fe6-1616-0410-a82d-ba8f324cfe61
Removed lots of extraneous print statements or converted them to logging calls. Removed `add_available_sites` call from `AdminApp` which was never used and only prints out arguments

(cherry picked from commit ea03ebc8d75c62edadf23fc2241491a7926eb55e)

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@13508 25043fe6-1616-0410-a82d-ba8f324cfe61
Handle skipping `__rsub__` on pypy. See #5760

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@13831 25043fe6-1616-0410-a82d-ba8f324cfe61
Replace all except Exception, e with except Exception as e

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@13952 25043fe6-1616-0410-a82d-ba8f324cfe61
Switch to calling the `kernel32` methods ourselves, and use `GetDynamicTimeZoneInformation` if possible. See #5858

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@14014 25043fe6-1616-0410-a82d-ba8f324cfe61
If the key name is returned (i.e. we have `GetDynamicTimeZoneInformation`), then use that directly instead of looking up the index. Name the variable more appropriately too. See #5858

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@14015 25043fe6-1616-0410-a82d-ba8f324cfe61
Added `ctypes` structures necessary to call the `GetDynamicTimeZoneInformation` not present in `win32timezones` - see #5858

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@14016 25043fe6-1616-0410-a82d-ba8f324cfe61
Add `VirtualTime` implementation that currently patches `time.time`, `datetime.datetime.now/utcnow` and the equivalent `datetime_tz` functions. See #6165

git-svn-id: svn+ssh://svn.sjsoft.com/home/opensvn/svn/trunk@14105 25043fe6-1616-0410-a82d-ba8f324cfe61