Commit Graph

21 Commits

Author SHA1 Message Date
Alex Gaynor b6b873d2ad Fixed several flake8 errors, including one where a test wouldn't be run 2014-05-17 09:54:34 -07:00
Aymeric Augustin 1109ebd7b3 Optimized make_aware/naive by removing redundant checks. Refs #22625.
Also added tests with pytz and removed misplaced tests.
2014-05-16 23:12:59 +02:00
Aymeric Augustin fa89acf1d0 Fixed #22625 -- Normalized make_aware/naive errors.
Also added tests for is/make_aware/naive.

Thanks Tom Michaelis for the report.
2014-05-16 22:52:10 +02:00
Aymeric Augustin 2b154ae280 Fixed #21880 -- Added missing items to django.utils.timezone.__all__.
Thanks Wim for the report.
2014-01-26 15:35:22 +01:00
Ray Ashman Jr e2ae8b048e Correct flake8 E302 violations 2013-11-02 19:53:29 -04:00
Alasdair Nicol b289fcf1bf Fixed #21288 -- Fixed E126 pep8 warnings 2013-10-21 08:31:30 -04:00
Aymeric Augustin ec2778b445 Fixed #17262 -- Refactored tzinfo implementations.
This commit deprecates django.utils.tzinfo in favor of the more recent
django.utils.timezone which was introduced when Django gained support
for time zones.
2013-09-09 22:32:51 +02:00
Aymeric Augustin ded11aa620 Fixed #18766 -- Pointed to pytz when LocalTimezone fails.
Thanks void for the report.
2013-09-08 02:04:43 -05:00
Aymeric Augustin 5a3d9490f1 Accepted None in tzname().
This is required by the tzinfo API, see Python's docs.

Also made _get_timezone_name deterministic.
2013-02-11 21:56:35 +01:00
Aymeric Augustin 9a4a1ce323 Fixed #19708 -- Exception in timezone.override(None).
Thanks rafales.
2013-01-31 16:01:50 +01:00
Aymeric Augustin 3cb2457f46 [py3] Replaced basestring by six.string_types. 2012-07-22 09:29:54 +02:00
Aymeric Augustin a15cfb2e45 Simplified timezones tests with settings_changed.
All relevant state is now properly reset whenever TIME_ZONE or USE_TZ
are changed in tests.
2012-04-29 16:03:46 +02:00
Aymeric Augustin 3e8b40f479 Fixed #17992 -- Added a public API for localtime.
Thanks Bradley Ayers for the report.
2012-04-29 15:37:23 +02:00
Aymeric Augustin 7ce1ad7c03 Made django.utils.timezone.localtime a private API -- it's too specific to the template engine.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17642 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-03 19:57:25 +00:00
Aymeric Augustin e0d78f898f Fixed #17715 -- Updated the tutorial for time zone support, plus a few other improvements.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17591 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-26 21:17:58 +00:00
Aymeric Augustin fc9e0606d5 Fixed a stupid bug in the implementation of timezone.make_aware.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17332 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-02 20:45:09 +00:00
Jannis Leidel 7a67102e8d Fixed django.utils.timezone.__all__ to include correct function names.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17259 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-23 11:19:00 +00:00
Aymeric Augustin 866c229f52 Fixed #17294 -- Supported nullable DateTimeFields when time zone support is enabled. Thanks pressureman for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17148 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-25 09:25:43 +00:00
Aymeric Augustin 43c5d35315 Fixed #17274 -- Accepted TIME_ZONE = None when USE_TZ = True. Thanks pressureman for the report.
This problem only occured when pytz is installed. It's still strongly recommended to define the correct time zone in TIME_ZONE in order to use pytz' implementation and not the approximation based on system time.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@17134 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-21 12:42:09 +00:00
Jannis Leidel 6f66b55108 Fixed #17255 -- Removed "as" prefix from new timezone template filter names for the sake of clarity. Cheers to Aymeric Augustin for bearing with me.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17107 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-18 15:00:08 +00:00
Aymeric Augustin 9b1cb755a2 Added support for time zones. Thanks Luke Plant for the review. Fixed #2626.
For more information on this project, see this thread:
http://groups.google.com/group/django-developers/browse_thread/thread/cf0423bbb85b1bbf



git-svn-id: http://code.djangoproject.com/svn/django/trunk@17106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-18 13:01:06 +00:00