Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Invalid Date" in warning begin/end #39

Merged
merged 3 commits into from
Feb 17, 2020
Merged

Conversation

ticaki
Copy link
Contributor

@ticaki ticaki commented Feb 11, 2020

fix #37, fix #31 "Invalid date" Fehler gefixt. Die "formatDate" Funktion in tools.js ist jetzt überflüssig.

@ticaki ticaki changed the title fix #37 "Invalid Date" in warning begin/end "Invalid Date" in warning begin/end Feb 12, 2020
adapter.setForeignState(channelName + '.begin', tools.formatDate(adapter.formatDate, warnObj.start), true);
adapter.setForeignState(channelName + '.end', tools.formatDate(adapter.formatDate, warnObj.end), true);
let td = new Date();
adapter.setForeignState(channelName + '.begin', warnObj.start === undefined ? '' : new Date (warnObj.start - td.getTimezoneOffset() * 60000).toISOString(), true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you use just toISOString instead of tools.formatDate(adapter.formatDate, date)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weil die meisten Zeit-States, die ich bisher gesehen habe das Iso Format ausgeben. Hab mich am häufig aktualisierten Admin-Adapter orientiert und den Datentyp String erhalten.

@GermanBluefox GermanBluefox merged commit 3999637 into ioBroker:master Feb 17, 2020
@R-Guhr
Copy link

R-Guhr commented Aug 3, 2021

Gibt es denn mittlerweile eine Lösung für dieses Problem?

DWD 2.7.7
Node.js 12.22.4
NPM 6.14.13

"Invalid Date" in den Objekten

grafik

@Apollon77
Copy link
Contributor

should be fixed since 2.7.7, ... if not please open new issue and atach afull debug log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid Date DWD Adapter value for "begin" and "end" has value "Invalid Date"
4 participants