[energidataservice] Update JS example (#16963)

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
This commit is contained in:
jimtng 2024-06-30 00:14:26 +10:00 committed by GitHub
parent 3770650bf4
commit bd2fd5555a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -739,7 +739,7 @@ logInfo("Spot price two hours from now", price.toString)
```javascript
var hourStart = time.toZDT().plusHours(2).truncatedTo(time.ChronoUnit.HOURS);
var price = items.SpotPrice.history.historicState(hourStart).quantityState;
var price = items.SpotPrice.persistence.persistedState(hourStart).quantityState;
console.log("Spot price two hours from now: " + price);
```