stoty commented on pull request #1289:
URL: https://github.com/apache/phoenix/pull/1289#issuecomment-904453628


   To recap:
   
   In this patch we use GJChronology internally, so 
   
   - upserting java.sql.Timestamp(10,10,**10**,10,10,10) will be read back as 
rs.getString() == "10-10-**10** 10:10:10" as a, but 
   - upserting 
java.sql.Timestamp.valueOf(java.time.LocalDateTme.of(10,10,**10**,10,10,10)) 
will be read back as rs.getString() == (10-10-**12** 10:10:10"
   
   If we used ISOChronology internally instead , then
   
   - upserting java.sql.Timestamp(10,10,**10**,10,10,10) would be read back as 
rs.getString() ==  "10-10-**08** 10:10:10", but 
   - upserting 
java.sql.Timestamp.valueOf(java.time.LocalDateTime.of(10,10,**10**,10,10,10)) 
will be read back as rs.getString() ==  "10-10-**10** 10:10:10"
   
   (The above examples assume that the local TZ is UTC)
   
   So we will will behave unexpectedly in some cases either way, no matter what 
we do, there will be surprises when using either the old java.util.Date , or 
the new java.time.API .
   
   The current patch favors the old API.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to