BattleScribe / Release

Bug tracking for the release (live) version of BattleScribe
13 stars 2 forks source link

DateTime format used in JSON api response parsing #148

Open amis92 opened 4 years ago

amis92 commented 4 years ago

The format used by JSON Schema for date-time is RFC3339. That's the format I've used for that field when designing the schema.

https://github.com/BSData/schemas/blob/492c60786fadf3c3b206f32c6637602c0bcb25fe/src/catpkg.schema.json#L168-L175

The App parses the format used currently by appspot website, which looks custom:

https://github.com/BSData/bsdata/blob/fc41ab0c231dc80c52336cef2d492d23abd50b92/src/main/java/org/battlescribedata/dao/GitHubDao.java#L91

The difference is in formatting of the time-zone

App: 2018-10-31T00:24:59.000+0000 RFC 2018-10-31T00:24:59.000+00:00

So, the current timezone formatting lacks the colon. 🤷‍♂️

Jonskichov commented 4 years ago

Can you confirm: The problem here is that the BSData site is returning JSON with incorrectly formatted dates? (I forget where the issue originates!)

amis92 commented 4 years ago

The problem is:

What I'm mostly after is BattleScribe support for RFC3339 format (with colon in timezone offset).

It's your decision whether to keep support for the custom one and add support for the standard one, or update Bsdata webapp to produce RFC3339 and then change BattleScribe to support that.

The JSON produced by the Registry/Gallery I'm setting up will use RFC3339 format.