Compare commits

..

2 Commits

Author SHA1 Message Date
Andreas Neue ffe325a7f0 Merge branch 'master' of git.dnix.de:an/flokati
continuous-integration/drone/push Build is failing Details
2019-08-29 16:36:02 +02:00
Andreas Neue 9746d49530 dont hardcode time offset in fuzzytime.go, set correct timezone in Dockerfile 2019-08-29 16:35:50 +02:00
2 changed files with 4 additions and 3 deletions

View File

@ -1,7 +1,8 @@
FROM golang:latest
MAINTAINER Andreas Neue <an@dnix.de>
RUN apt -y update && apt -y upgrade && apt-get install -y fortune vim ca-certificates && apt-get clean
RUN apt -y update && apt -y upgrade && apt-get install -y fortune vim tzdata ca-certificates && apt-get clean
RUN ln -fs /usr/share/zoneinfo/Europe/Berlin /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
WORKDIR /go/src/flokati
COPY . .

View File

@ -29,8 +29,8 @@ func fuzzytimeHandleMessage(m *Message) {
func fuzzytimeShow(channel string) {
t := time.Now()
h := t.Hour()
tzcorrect := 1
h = h + tzcorrect // XXX: This should not be hardcoded
z, o := t.Zone()
h = h + o
m := t.Minute()
s := "Es ist "
switch {