Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
The parseDate function works when I run it in a service for testing purposes, but it does not work when I try to use it in a subscription that calls a service that uses the parseDate function.
Please see below:
Working example: Converts PST time to JST time
Not working: Service called by subscription
Error: "Invalid format"
For reference:
https://www.ptc.com/en/support/article/CS219448
https://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html
Solved! Go to Solution.
I found the error....
It seems that I was using "eventData" instead of "eventData.newValue.value" as the input in the subscription....
The subscription is triggered based on DataChange.
It seems to want to 'pass on' time from epoch?
not sure why it works in one and not the other, is there any basetype differences?
Basetypes of both services:
Input: string
Output: TimeStamp
I found the error....
It seems that I was using "eventData" instead of "eventData.newValue.value" as the input in the subscription....
The subscription is triggered based on DataChange.
Hi @Willie.
Which version of ThingWorx are you running? We tested under 8.5.3 and received an unexpected result. We'll probably need to open an internal case for this.
Regards.
--Sharon
I am using thingworx v8.4.5