Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
zinen authored Oct 9, 2024
1 parent 0241cbc commit 5ec22bc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nordpool-api-plus.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@ module.exports = function (RED) {
// }))
// msg.payload = await prices(node, nordpoolPrices, opts)
} catch (error) {
// console.log('Error ' + String(error))
// console.log('Error opts ' + JSON.stringify(opts))
console.log('Error ' + String(error))
console.log('Error opts ' + JSON.stringify(opts))
done(error.message)
return
}
if (node.action === 'rolling') {
date = new Date()
date = new Date(date.setDate(date.getDate() - 1)).toISOString()
opts.date = date.getFullYear() + '-' + String(date.getMonth() + 1).padStart(2, '0') + '-' + String(date.getDate()).padStart(2, '0')

Expand All @@ -72,6 +73,7 @@ module.exports = function (RED) {
done(error.message)
return
}
date = new Date()
date = new Date(date.setDate(date.getDate() + 2)).toISOString()
opts.date = date.getFullYear() + '-' + String(date.getMonth() + 1).padStart(2, '0') + '-' + String(date.getDate()).padStart(2, '0')
try {
Expand Down

0 comments on commit 5ec22bc

Please sign in to comment.