﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
12261	strftime function from django.utils.datetime_safe doesn't work properly in years below 1000	Javier de la Rosa	nobody	"If a model has a DateTimeField attribute, in order to serialize the objects, django uses the format ""%Y/%m/%d"". However the function {{{strftime}}} doesn't handle properly the option ""%Y"" in years below 1000: instead to fill with zeros (0) until to complete the 4 digits, it uses spaces. Therefore, at deserialization time django raises a exception.

Currently
{{{
>>> datetime_safe.date(850, 8, 2).strftime(""%Y/%m/%d"")
' 850/00/02'
}}}
It must to be

{{{
>>> datetime_safe.date(850, 8, 2).strftime(""%Y/%m/%d"")
'0850/00/02'
}}}

The simplest patch is atached, but this issue can be deeper."		closed	Core (Serialization)	1.1		duplicate	datetime serialization strftime		Unreviewed	1	0	1	0	0	0
