What is django.utils.datetime_safe and should I use it instead of standard datetime?

datetime, django, python

Solution

The difference is noted in the source code for `datetime_safe`:

# Python's datetime strftime doesn't handle dates before 1900.
# These classes override date and datetime to support the formatting of a date
# through its full "proleptic Gregorian" date range.

Huh.

Problem

What are the differences? Is it safer to use `datetime_safe`? I can't find any documentation on this class.

Original source