JSON API: fix date format issue

Instead of strtotime, we'll use date_format
This may need a rebase before we merge.