[
https://issues.apache.org/jira/browse/CALCITE-1832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julian Hyde resolved CALCITE-1832.
----------------------------------
Resolution: Not A Bug
Marking "not a bug". Behavior is as intended.
Feel free to add a {{int gregorianToJulian(int date)}} method or similar.
> DateTimeUtils dateString to Unix translation error
> --------------------------------------------------
>
> Key: CALCITE-1832
> URL: https://issues.apache.org/jira/browse/CALCITE-1832
> Project: Calcite
> Issue Type: Bug
> Components: avatica
> Affects Versions: 1.10.0
> Reporter: Stefano Bortoli
>
> Using the latest snapshot of Calcite, one of the Apache Flink Test fails. The
> failure is due to an error in CAST, that relies on Avatica DateTimeUtils.
> I have implemented a simple class test:
> {code}
> public class Test
> {
> public static void main( String[] args )
> {
> int dateInt = DateTimeUtils.dateStringToUnixDate("1500-03-04");
> System.out.println(dateInt);
> System.out.println(DateTimeUtils.unixDateToString(dateInt));
>
> }
> }
> {code}
> and the output is:
> {code}
> -171592
> 1500-03-14
> {code}
> it adds an offset of 10 days for some reason.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)