So I'm trying to use dates with mysql on the wso2 dss. Simple code
<query id="testDates" useConfig="PORTFOLIOS_DS">
<sql>
SELECT DATE(date) AS date FROM dateTest
</sql>
<result element="jsonObject" rowName="jsonArray">
<element column="date" name="testDate" xsdType="date"/>
</result>
</query>
So it returns "2015-03-10-04:00"
which isn't considered a valid date my many libraries (momentJS in particular) and to be fair it is a strange format, why do I care about timezone without the time.
Does anyone know why it is appending the timezone, how can I prevent the appending of timezone to dates but leave it on datetimes?
I was able to reproduce this issue with DSS 3.5.0 version. So I have already created a public JIRA ticket [1]. and once this is fixed I will notify you.
In the meantime as a workaround, I would like to suggest to use an XSLT transformation to trip off timezone information. For more information about how to use XSLT inside the DSS server please refer [2]
[1]. https://wso2.org/jira/browse/DS-1191
[2]. https://docs.wso2.com/display/DSS350/XSLT+Transformation+Sample
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.