openhab / openhab-js

openHAB JavaScript Library for JavaScript Scripting Automation
https://www.openhab.org/addons/automation/jsscripting/
Eclipse Public License 2.0
38 stars 31 forks source link

Add support for Quantity to toZDT() #245

Closed rkoshak closed 1 year ago

rkoshak commented 1 year ago

The current code handles QuantityType but now that we support our own JS implementation we should also support that too.

I'm mostly adding this as a reminder to myself but if someone gets to it before me so much the better. ;-)

florian-h05 commented 1 year ago

toZDT should handle Quantity as well:

https://github.com/openhab/openhab-js/blob/82a465bdf08895b3b2664ceb9d4bf8363795bf09/time.js#L255-L258

I’ve already added this some time ago.

rkoshak commented 1 year ago

I completely missed that. As I was reading through it I read that as QuantityType. My bad.