fedora-infra / fas

Fedora Account System
https://admin.fedoraproject.org/accounts
GNU General Public License v2.0
40 stars 50 forks source link

Make JSON `CreationDate`s be in isoformat #101

Closed relrod closed 9 years ago

relrod commented 9 years ago

To be consistent with StartTimeStamp/EndTimeStamp in the general result template. Makes parsing the dates into a date format in other environments a bit easier since they are all the same format.

Signed-off-by: Ricky Elrod ricky@elrod.me

ralphbean commented 9 years ago

Any idea if this is or is not backwards compat with how fas2 does things?

relrod commented 9 years ago

@ralphbean I think the whole API is already not backwards compatible. e.g.:

$ git grep CreationDate FAS_3.0 
FAS_3.0:fas/models/group.py:                'CreationDate': self.created.strftime('%Y-%m-%d %H:%M'),
FAS_3.0:fas/models/people.py:                'CreationDate': self.date_created.strftime('%Y-%m-%d %H:%M'),
$ git grep CreationDate develop
$ 

(and also the addition of API keys which FAS2 didn't have).

So I didn't think backwards compatibility was a concern.

That said, if I go to https://admin.fedoraproject.org/accounts/user/view/codeblock?tg_format=json I don't see creation dates, but all of the dates that I do see are in ISO format.

ralphbean commented 9 years ago

Cool, :+1: to change here.

relrod commented 9 years ago

Thanks for the review!