[X] This issue is still present in the current beta version of this adapter
[X] There is no other (open) issue with the same topic (use the search!)
[X] This issue is not described in the adapter documentation / FAQ (read the docs!)
Script type
JavaScript
The problem
I think that getAstroDate has an unwanted side-effect on the date argument in some situations: after calling getAstroDate(pattern,date) with a date variable, date's time of day is set to noon. To reproduce:
const now = new Date()
log(`now1 = ${now}`, 'debug')
var night = new Date(getAstroDate("night",now))
log(`now2 = ${now}`, 'debug')
I'm sure that
Script type
JavaScript
The problem
I think that
getAstroDate
has an unwanted side-effect on the date argument in some situations: after callinggetAstroDate(pattern,date)
with a date variable, date's time of day is set to noon. To reproduce:iobroker.current.log (in debug mode!)
See now2 showing 12:00 in contrast to now1 showing 15:30 correctly.
Version of nodejs
18.17.1
Version of ioBroker js-controller
5.0.19
Version of adapter
7.8.0