From 43f836dbac7a1b070c4d86e499b8757ef4d6eca5 Mon Sep 17 00:00:00 2001 From: jenish-jain Date: Sun, 8 Oct 2023 17:47:23 +0530 Subject: [PATCH] fixing timezone detection issue with tzdata import Signed-off-by: jenish-jain --- Dockerfile | 2 -- pkg/utils/date_utils.go | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 43ec798..aa1331c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,8 +12,6 @@ RUN go mod download # Copy local code to the container image. COPY . ./ -RUN apk update && apk add bash && apk --no-cache add tzdata - RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" cmd/bean_counter/main.go FROM scratch diff --git a/pkg/utils/date_utils.go b/pkg/utils/date_utils.go index de61592..b71c06f 100644 --- a/pkg/utils/date_utils.go +++ b/pkg/utils/date_utils.go @@ -5,6 +5,7 @@ import ( "regexp" "strconv" "time" + _ "time/tzdata" ) func ParseMDYYYYToDate(dateString string) time.Time {