Fix timezone issue.

This commit is contained in:
Nuno Cruces 2022-04-07 12:50:20 +01:00
parent ef54d30320
commit 3d8e1d5f7e
2 changed files with 10 additions and 1 deletions

View file

@ -17,7 +17,7 @@ func Calendar(text string, options ...Option) (time.Time, error) {
// DefaultDate returns an Option to set the date.
func DefaultDate(year int, month time.Month, day int) Option {
return funcOption(func(o *options) {
t := time.Date(year, month, day, 0, 0, 0, 0, time.UTC)
t := time.Date(year, month, day, 0, 0, 0, 0, time.Local)
o.time = &t
})
}

9
scripts/calendar.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
if zenity --calendar \
--title="Select a Date" \
--text="Click on a date to select that date." \
--day=10 --month=8 --year=2004
then echo $?
else echo "No date selected"
fi