Unix Timestamp to DateTime

I’m getting data from a gps-tracker as Json and I want to convert it to gpx.
One part of the conversion has to be the date.
The Date and Time comes like this:
"gpsTime": 1654327146,
This might be a unix timestamp.
I need to convert it into something like this:
<time>2022-06-19T14:18:40.000+02:00</time>
I found some examples to convert a unix timestamp into an old “date” object, but this isn’t going to work with the DateTime object.
Is there a new example for the conversion available?
I know it’s easy to do this in bash, so I thought I would declare a DateTime object and set the “SecondsFrom1970” to the value of the unix timestamp.
The only problem is, that the Property is readonly.

One of the constructors of the DateTime class takes a number of seconds. So, instead of setting the SecondsFrom1970 property of an existing DateTime, create it with the value:

Var dt as New DateTime(gpsTime)

@Arnaud_N thanks, that’s working, so far.
How do I use this within a loop?
I have to work through a Jsonarray which contains all the data.
So do I have to create a new DateTime Object for each iteration?

Yes; it then depends on what you want to do with the date.

For example, here’s how you’d store all the dates:

Var dts() As DateTime

do
//Read next data

Var dt As New DateTime(gpsDateTime) //read just above; that’s each of your dates.

dts.Add dt

if not NextDataAvailable then exit //What tells you you have handled all the data
loop

//dts contains all the dates you’ve collected.