Change UTC time from json value

Hi all!
I have a Rest API that I pull some data from. It looks like this:


[

  {

"TripId": 231672455,

"TripStartDateTime": "2019-11-25T05:44:04",

"TripEndDateTime": "2019-11-25T05:52:02",

"DistanceKilometers": 3.26,

"FuelConsumptionInLiters": 0.23,

"TripStartFormattedAddress": "Murgrönsvägen 19, 232 54 Åkarp, Sweden",

"TripEndFormattedAddress": "Harakärrsvägen 13, 232 53 Åkarp, Sweden",

"TripStartCustomAddress": "Hemma",

"TripEndCustomAddress": null,

"VehicleId": 66351,

"TripType": 0,

"DriverContactId": 31932,

"HasSpeedingViolation": false,

"HasIdlingEvent": false,

"HasAccelerationEvent": false,

"HasAccident": false,

"HasTurningEvent": false,

"HasBrakingEvent": false,

"ParkedForMinutesUntilNextTrip": 2,

"HasDrivingEvents": false,

"CustomCategory": null,

"TripTags": null,

"HideStartRoute": false,

"HideEndRoute": false,

"VehicleType": 6,

"TripApprovalStatus": null,

"IsMerged": false,

"HasGermanTaxRules": false,

"IsLocked": false,

"LockReason": 0

},


  {

"TripId": 231675778,

"TripStartDateTime": "2019-11-25T05:54:31",

"TripEndDateTime": "2019-11-25T06:12:40",

"DistanceKilometers": 16.04,

"FuelConsumptionInLiters": 1.08,

"TripStartFormattedAddress": "Harakärrsvägen 13, 232 53 Åkarp, Sweden",

"TripEndFormattedAddress": "Kantyxegatan 25L, 213 76 Malmö, Sweden",

"TripStartCustomAddress": null,

"TripEndCustomAddress": null,

"VehicleId": 66351,

"TripType": 0,

"DriverContactId": 31932,

"HasSpeedingViolation": false,

"HasIdlingEvent": false,

"HasAccelerationEvent": false,

"HasAccident": false,

"HasTurningEvent": false,

"HasBrakingEvent": false,

"ParkedForMinutesUntilNextTrip": null,

"HasDrivingEvents": false,

"CustomCategory": null,

"TripTags": null,

"HideStartRoute": false,

"HideEndRoute": false,

"VehicleType": 6,

"TripApprovalStatus": null,

"IsMerged": false,

"HasGermanTaxRules": false,

"IsLocked": false,

"LockReason": 0

}
],

I want to change "TripStartDateTime" and "TripEndDateTime" to the right format (dddd, MMMM Do, YYYY h:mma) first of all and then change the value to +1 hour.
I have managed to get a timestamp in the correct format by using the moment-node but how do I change the value when i call GET from the API?
Is this possible?
I´m really a noob at this and can´t figure out what to do next.

/Mattias

I am pretty sure you should be able to construct a javascript Date object direct from the date string, have you tried that?
[Edit] but maybe that is not what you are asking. Why do you need it in the format you describe

The format is not that important, I want to get the correct time from each trip I make.
The API sends UTC time and in my location it is +1 hour.
I have looked at the function node but cant get my head around how to write the code.
I don´t really know where to start :flushed:

There should be no need to add the hour, you can just tell the system to display it in localtime when you want to display it. What exactly do you want to do with the data?
Start by reading the node red docs on Working with Messages which will provide a lot of useful information.