-
Notifications
You must be signed in to change notification settings - Fork 21
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
Does not work with daylight saving time #34
Comments
This seems like a pretty big issue. |
I don't think it's is critical problem - from top of my head this can happen only when setting a date in the query. Otherwise (when asking a time for today), it should be working fine. Still worth to check though. Best regards, |
Took a look at timezone_list.sh and from the code snippet below: #
# create source date
#
if [ 'tm' = "$date_modification_search" -o 'tomorrow' = "$date_modification_search" ]
then
dateToConvert=$(date -v +1d +%Y%m%d)
elif [[ "$date_modification_search" =~ ^[0-9]+d$ ]]
... (The full date handling logic is in timezone_list.sh:72-99) Whenever a date is entered, the script uses the -v flag for the date command to create an offset. From the date man page under the -v flag:
So seems like you're right @jaroslawhartman, this is only a problem when the date is entered. As shown below, without a date offset that flag isn't used so DST considerations are kept. else
# fallback that also covers 't' and 'today'
dateToConvert=$(date +%Y%m%d)
fi |
Example: Zurich (Switzerland) will begin the daylight saving time on 29 March 2020.
I have a quick look at the code and cannot find any file that keep the data on daylight saving time, so I guess that the change may be non-trivial.
The text was updated successfully, but these errors were encountered: