-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
[C++] dateTime.hour(date)
is off by one hour
#159
Comments
Oh, |
@kseistrup : Is your area affected by "daylight savings"? If so, maybe this issue should be reopened. |
Yes, I'm in I am completely new to miniscript (after it was mentioned on lobste.rs) and wrote a short script in miniscript: https://codeberg.org/kas/qtime/src/branch/master/miniscript/qtime.ms It works with edit: typo |
dateTime.hour(date)
is off by one hourdateTime.hour(date)
is off by one hour
@kseistrup Can you edit the source and add dateTime.tm_isdst = -1; right before this call to mktime() in DateTimeUtils.cpp, line 307 ? It fixes the issue on my machine when I "pretend" that I'm in Copenhagen. Want to be sure that for the real Copenhagen it works as well. |
After adding that line Using For now the addition seems to have solved the issue. Thanks 🙏 |
Also fix issue 159: * JoeStrout/miniscript#159
In the following I expected
dateTime.hour(now)
to return16
, instead I got17
:The text was updated successfully, but these errors were encountered: