[solved] NTP in HTML Layout

Following the guidelines given in this community I’ve successfully created an HTML page for the local weather information.
For example the current temperature is displayed using this simple statement:

<td id="weather-temp">${weather:temperature.current(%.1f)}</td>

Now I’d like to add the current date and time to this HTML site using the NTP binding.
I was hoping that inserting something like this would just print the desired information:

<td id="date-today">${ntp:Europe/Berlin:de_DE(%1$tA, %1$td.%1$tm.%1$tY %1$tH:%1$tM)}</td>

But of course it doesn’t. Instead the text within the paragraph-tag is displayed.

So is there a simple method to include the current Date from NTP in an HTML site?

You used to be able to do that in OH 1.7 with the weather binding. But there were some architectural changes made on OH 2 which required a change to the Weather Binding that removed the ability to do that.

For now, only values from the Weather binding can be accessed from the webview.

So here’s my fix:

The weather information is updated with an interval of 1 minute. So I simply use this to display the current date and time in my weather.html:

<div id="weather-date-today">${weather:condition.lastUpdate(%1$tA, %1$td.%1$tm.%1$tY %1$tH:%1$tM)}</div>

I’m only going to use the date information which allows me to reduce the weather uptdate interval to 15 minutes:

<div id="weather-date-today">${weather:condition.lastUpdate(%1$tA, %1$td.%1$tm.%1$tY)}</div>