openhab-scripters / openhab-helper-libraries

Scripts and modules for use with openHAB
Eclipse Public License 1.0
88 stars 70 forks source link

Fix to_joda_datetime not working #192

Closed CrazyIvan359 closed 5 years ago

CrazyIvan359 commented 5 years ago

Joda cannot parse Java instants, so the method to_joda_datetime will always throw an error. This PR converts the time to a string to be parsed by Joda

Fixes #191

Signed-off-by: Michael Murton 6764025+CrazyIvan359@users.noreply.github.com

CrazyIvan359 commented 5 years ago

Seems the joda DateTime constructor ignore the timezone in the string when passing a time in as a string and uses the local timezone. I have added back the specification of the timezone in the DateTime constructor used in to_joda_datetime