Fix timezone issue.
This commit is contained in:
parent
ef54d30320
commit
3d8e1d5f7e
2 changed files with 10 additions and 1 deletions
2
date.go
2
date.go
|
@ -17,7 +17,7 @@ func Calendar(text string, options ...Option) (time.Time, error) {
|
||||||
// DefaultDate returns an Option to set the date.
|
// DefaultDate returns an Option to set the date.
|
||||||
func DefaultDate(year int, month time.Month, day int) Option {
|
func DefaultDate(year int, month time.Month, day int) Option {
|
||||||
return funcOption(func(o *options) {
|
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
|
o.time = &t
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
9
scripts/calendar.sh
Executable file
9
scripts/calendar.sh
Executable 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
|
Loading…
Reference in a new issue