I just upgraded OH to Beta3 and it has some strange behavior.
-OH2 running on a Raspberry Pi
OS configured with correct local time (For example 16:00) (UTC+2)
-My NTP thing is correctly configured (I also tried with different configurations such Europe/Berlin)
hostname: 0.pool.ntp.org
Timezone: Europe/Madrid
Locale: es_ES
-The time I get on my Sitemaps is -2h (14:00) which corresponds to UTC time
The background of this issue due to the formatter class always using the default time zone for the instance of the Java virtual machine. See also http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html
This class is used to display the time in the UI. So though the binding is sending a object containing the right timezone to the OH framework, the output to the UI ignores it
I made an update to the binding where you can output a string channel which does allow you to actually output the time in the timezone you defined.
No, the problem seems to be much deeper in Smarthome/OH. From what I see the following is happening:
For all Types, there is the general assumption that they should be reconstructable from their string representation, i.e. typeX.equals(new TypeX(typeX.toString())) should be true.
This is currently not the case for the DateTimeType, since the toString methods converts from a calendar to a Date Object, removing the timezone information which is contained within the internal Calendar object. (some other info is lost as well, e.g. firstdayoftheWeek etc)