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

ReGaHSS: .ToString() .Format() -> fehlerhafte Ausgabe bei Zeitwerten mit Weltzeit #2670

Open
BadenPower opened this issue Mar 8, 2024 · 0 comments
Labels
🐛 bug-report Something isn't working

Comments

@BadenPower
Copy link

Describe the issue you are experiencing

Die Methoden .Format() und .ToString() berücksichtigen nicht den im Variabletyp time mit der Methode .IsLocalTime() hinterlegten Wert für die Angabe, ob es sich um Weltzeit oder lokale Zeit handelt, sondern formatieren die Ausgabe immer, als wäre die lokale Zeit gültig. Dies macht die Methoden .ToString() und .Format() zum Anzeigen von Weltzeiten unbrauchbar.

Describe the behavior you expected

Erwartet würde die korrekte Formatierung unter Berücksichtigung der hinterlegten Eigenschaften im Zeitwert.

Steps to reproduce the issue

Ausführung des folgenden Skriptes unter "Skript testen":

WriteLine("Start");
WriteLine(dom.BuildLabel());
WriteLine(localtime);
WriteLine(currenttime);
WriteLine(localtime.IsLocalTime());
WriteLine(currenttime.IsLocalTime());
WriteLine(localtime.Hour());
WriteLine(currenttime.Hour());
WriteLine("");
WriteLine("----------- .Format() -----------------------------");
WriteLine("");
WriteLine(localtime.Format("%c"));
WriteLine(currenttime.Format("%c"));
WriteLine(localtime.Format("%T"));
WriteLine(currenttime.Format("%T"));
WriteLine(localtime.Format("%Z"));
WriteLine(currenttime.Format("%Z"));
WriteLine(localtime.Format("%z"));
WriteLine(currenttime.Format("%z"));
WriteLine("");
WriteLine("----------- .ToString() -----------------------------");
WriteLine("");
WriteLine(localtime);
WriteLine(currenttime);
WriteLine(localtime.IsLocalTime());
WriteLine(currenttime.IsLocalTime());
WriteLine(localtime.ToString("%c"));
WriteLine(currenttime.ToString("%c"));
WriteLine(localtime.ToString("%T"));
WriteLine(currenttime.ToString("%T"));
WriteLine(localtime.ToString("%Z"));
WriteLine(currenttime.ToString("%Z"));
WriteLine(localtime.ToString("%z"));
WriteLine(currenttime.ToString("%z"));
WriteLine("Ende");  

What is the version this bug report is based on?

CCU3 mit ReGaHSS-Version R1.00.0388.0235

Which base platform are you running?

rpi3 (RaspberryPi3)

Which HomeMatic/homematicIP radio module are you using?

n/a

Anything in the logs that might be useful for us?

bestehend seit:
unbekannt (bereits mit ReGaHss-Version R1.00.0388.0102)

Additional information

Ausgabe des Skriptes (uhrzeitabhängig) :

Start
R1.00.0388.0235
2024-03-08 21:01:41
2024-03-08 21:01:41
1
0
21
20

----------- .Format() -----------------------------

Fri Mar  8 21:01:41 2024
Fri Mar  8 21:01:41 2024
21:01:41
21:01:41
CET
CET
+0100
+0100

----------- .ToString() -----------------------------

2024-03-08 21:01:42
2024-03-08 21:01:42
1
0
Fri Mar  8 21:01:42 2024
Fri Mar  8 21:01:42 2024
21:01:42
21:01:42
CET
CET
+0100
+0100
Ende
@BadenPower BadenPower added the 🐛 bug-report Something isn't working label Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug-report Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant