# MQTT binding upgrade to OH3 rule not working

**URL:** <https://community.openhab.org/t/mqtt-binding-upgrade-to-oh3-rule-not-working/119883>\
**Category:** Beginners\
**Created:** [March 29, 2021, 9:08pm UTC](https://community.openhab.org/t/mqtt-binding-upgrade-to-oh3-rule-not-working/119883 "2021-03-29T21:08:32Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Oded](https://community.openhab.org/letter_avatar_proxy/v4/letter/o/48db29/32.png) [@Oded](https://community.openhab.org/u/Oded)\
**Post date:** [March 30, 2021, 12:15pm UTC](https://community.openhab.org/t/mqtt-binding-upgrade-to-oh3-rule-not-working/119883/9 "2021-03-30T12:15:40Z")

</div>

So I understand that my problem is in the datetime conversion and find that there is a changed in OH3 with datetime type:

> [@DateTime Conversion (openHAB 3.x)](https://community.openhab.org/t/datetime-conversion-openhab-3-x/107197):
>
> Because openHAB 2.x rules use Jodatime instead of Java Time API, there is still the old [DateTime Conversion thread for openHAB 2.x](https://community.openhab.org/t/datetime-conversion-openhab-2-x/54266). Overview In openHab 3.x there are different ways to handle Date/Time values. DateTimeType A [DateTime Item](https://www.openhab.org/docs/concepts/items.html#items) carries a [DateTimeType](https://www.openhab.org/docs/concepts/items.html#state-and-command-type-formatting). Java Time By default openHAB 3.x Rules DSL use [java.time API](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/package-summary.html) to represent date and time. Principle java date-time concepts are [LocalDateTime](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/LocalDateTime.html) (date and time without any offset or time-zone) and [ZonedDateTime](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZonedDateTime.html) (“full” date-time wit…

---

_[View the full topic](https://community.openhab.org/t/mqtt-binding-upgrade-to-oh3-rule-not-working/119883)._
