[
https://issues.apache.org/jira/browse/CAMEL-12334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16398407#comment-16398407
]
ASF GitHub Bot commented on CAMEL-12334:
----------------------------------------
hemangajmera commented on issue #2254: CAMEL-12334: Mapped date to LocalDate
and time to LocalTime
URL: https://github.com/apache/camel/pull/2254#issuecomment-372987157
I am not seasoned java developer. I copied the existing code for DateTime to
make is work for Date and Time since I got error. So please excuse me if some
of my comment doesnt make full sense, since I am not used to most of the
libraries and framework used.
1. Regarding use of Jackson Modules. I think that will be better and it may
clean up lot of unwanted code which is written. But for XStream, do we still
need to have our custom code.
2. Salesforce returns only date without timezone, for eg. "2017-02-17".
While receiving data from salesforce and sending it back to salesforce we need
to use only date and time in UTC timezone
(https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/primitive_data_types.htm)
Also there was no suitable class for Date with timezone in java.time
package, hence I used LocalDate and LocalTime. I could have use OffsetTime, but
kept it identical.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Salesforce DTO does not use correct datatype for "date" and "time" field
> ------------------------------------------------------------------------
>
> Key: CAMEL-12334
> URL: https://issues.apache.org/jira/browse/CAMEL-12334
> Project: Camel
> Issue Type: Improvement
> Components: camel-salesforce
> Affects Versions: 2.20.2
> Reporter: Hemang Ajmera
> Priority: Major
> Labels: maven
>
> The DTO classes generated by the Maven plugin uses ZonedDateTime for all three
> * datetime
> * date
> * time
> The generation works fine, but is is not able to marshal/unmarshal correctly.
> The DTO should use different kind of field. My suggestion is to use
> * ZonedDateTime for datetime
> * LocalDate for date
> * LocalTime for time
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)