How do I convert a item with local time to UTC?

always this time formatting…

I calculate a time difference with these rules and would like to display the elapsed time in the sitemap.
My problem: The elapsed time is simply displayed in the local time. In the script, I simply subtract one hour, which works in wintertime, but in the summertime, I have to adjust the script again.

How can I solve the problem more elegantly?

Here is my code.

DateTime    Gmc_brenndauer       "Brenndauer [%1$tH:%1$tM h]"                <fire> 
DateTime    Gmc_brenndauer_start "Startzeit der Zündung [%1$tH:%1$tM Uhr]"   <fire> 
val long DateStart = (Gmc_brenndauer_start.state as DateTimeType).zonedDateTime.toInstant.toEpochMilli
val long Datenow 	= now().toInstant.toEpochMilli
val Java_Brenndauer = Instant.ofEpochMilli((Datenow - DateStart)).atZone(ZoneId.of("UTC")) // #6 convert epoch to JavaTime

val Brenndauer = new DateTimeType(Java_Brenndauer.minusHours(1)) // #3 convert JavaTime to DateTimeType	
sendCommand(Gmc_brenndauer, Brenndauer)

If you use a Datetime Item, it’s going to display as a date time, naturally enough. An un-advertised property of the UIs is that they will silently convert datetime to display in the system local time, too. I don’t know how to stop that.

Avoidance - don’t use a Datetime Item for an elapsed time.
Format out your result into a String Item. (but beware of it all going wrong for >24hrs, first “day” is 1 not 0)
Or use a Number:Time type Item, openHAB’s duration type.

Thanks for the Answer.
I changed the Item in Number:Time but in Sitemap shows [ -:- h ]

Number:Time Gmc_brenndauer       "Brenndauer [%1$tH:%1$tM h]"                       <fire> //
2022-02-02 10:52:00.872 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Gmc_brenndauer' received command 1970-01-01T00:46:24.912+0000

That’s a date time format, it’s not going to work with a Number. It’s just a simple Quantity, like a Number:Temperature, a numeric with units.
[%.1f h]

There’s an idea for fancier formatting here

It’s no good commanding a Number with a datetime.
You need to send it a Quantity, a single numeric with a unit.
If you want to just update the Item, update it, don’t send a command.
You’re working with milliseconds already, so something like -
Gmc_brenndauer.postUpdate(myResultInMilliseconds.toString + " mS")