Do you consider adjusting timezones when using JDBC? On Jan 8, 2016, at 3:01 AM, Thomas Decaux <[email protected]<mailto:[email protected]>> wrote:
What about Phoenix shell? I don't see this problem with Datagrip or Phoenix shell. 2016-01-07 20:53 GMT+01:00 <[email protected]<mailto:[email protected]>>: Hello, I am having a DATE column in Phoenix DB. Through SQuirreL SQL client or JDBC, when I do an upsert date as string, the resultant date is always one day less. For ex all the below statements (with any date format in TO_DATE function) yield the same result (i.e., instead of 15th it’s 14th of July): COLUMN TYPE ======= ==== COL1 VARCHAR COL3 DATE Queries: ====== UPSERT INTO TEST VALUES ('5', TO_DATE('2016-07-15', 'yyyy-MM-dd')) UPSERT INTO TEST VALUES ('5', '07/15/2016') SELECT * FROM TEST Result: ====== 5 2016-07-14 If I use JDBC PreparedStatement.setDate(…), it works as expected. Any ideas? Thanks Kannan. _______________________________________________ This message is for information purposes only, it is not a recommendation, advice, offer or solicitation to buy or sell a product or service nor an official confirmation of any transaction. It is directed at persons who are professionals and is not intended for retail customer use. Intended for recipient only. This message is subject to the terms at: www.barclays.com/emaildisclaimer<http://www.barclays.com/emaildisclaimer>. For important disclosures, please see: www.barclays.com/salesandtradingdisclaimer<http://www.barclays.com/salesandtradingdisclaimer> regarding market commentary from Barclays Sales and/or Trading, who are active market participants; and in respect of Barclays Research, including disclosures relating to specific issuers, please see http://publicresearch.barclays.com<http://publicresearch.barclays.com/>. _______________________________________________
