@Ktmi, for these cases flask provides jsonify (that we also use in other NApps in the responses instead of building and hooking into reponse_class), I think the intention would be clearer and cleaner with it:
I used pydantics jsonfiy specifically to match TIME_FMT we are using. If we remove the requirement to match TIME_FMT, then we can perform marshalling with flask. This should also fix the issue with submitting times that don't include tz info.
I see. So, this won't be a blocker for this PR, since the TIME_FMT with %z was already in place historically, but since we're stabilizing the v1 of this NApp, I'll encourage you to continue this discussion, supporting timezones other than UTC with the %z offset fmt can really complicate things and make it harder to maintain and also to correlate events (good thing that on logs we'll have UTC on each log entry). Maybe we can nuke pytz and only support UTC in the v1 of this NApp? It would be great to confirm and have a discussion with network operators. In the old blueprint draft (that will be refined) on issue https://github.com/kytos-ng/maintenance/issues/59 we also didn't have any requirement to support arbitrary timezones.
We've been using UTC everywhere on NApps and core (core also natively supports encoding datetime with this "%Y-%m-%dT%H:%M:%S format.
Hi,
Trying to capture the discussion on PR #64:
@viniarck viniarck 3 weeks ago
@Ktmi Ktmi 3 weeks ago
@viniarck viniarck 3 weeks ago