Thanks, that's what I did.  In my humble opinion, the ValueError should be 
removed and the timezone serialized in the form UTC offset (eg: -0400).

On Tuesday, August 12, 2014 9:43:11 PM UTC-4, Collin Anderson wrote:
>
> Wow. That almost sounds like a bug, though you can however use a callable. 
> As ridiculous as it looks, it should work :).
>
> INF_TIME = datetime.max.replace(tzinfo=timezone.utc)
>
> def get_inf_time():
>     return INF_TIME
>
> death = models.DateTimeField(default=get_inf_time)
>
> What you are doing seems pretty rare, though it seems maybe that error 
> message should not be recommending a naive datetime.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5301ae6b-078b-41cb-9bda-9167b1928681%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to