-
Notifications
You must be signed in to change notification settings - Fork 3
Add support for ZonedDateTime in EventHandler
#136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add support for ZonedDateTime in EventHandler
#136
Conversation
Signed-off-by: Arnau Mora <[email protected]>
Signed-off-by: Arnau Mora <[email protected]>
Signed-off-by: Arnau Mora <[email protected]>
rfc2822
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #135 (comment)
The "parse and catch exception" approach doesn't seem to be a proper solution, at least not in the handle().
I think we should define a separate parseStartDate() method that
- has well-defined inputs and outputs,
- supports the required input formats,
- is tested separately.
Within that method, we should use other methods to determine the input format. If that's really not possible, we can still use the exception method.
| // Some server providers (e.g. t-mobile) include time information | ||
| // This is allowed by RFC2426: https://www.rfc-editor.org/rfc/rfc2426#section-3.1.5 | ||
| // And RFC6350: https://www.rfc-editor.org/rfc/rfc6350#section-6.2.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is not related to vCard, as it only handles the field of the local contacts provider. So RFCs about vCard don't apply.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides from empty, I think we should test at least
- the four formats of the AOSP Contacts app (see issue),
- possibly additional common date / date-time formats that we want to support.
Signed-off-by: Arnau Mora <[email protected]>
See #135 and bitfireAT/davx5-ose#1797.