From 98fb714211c1e30891ea1c3e1542d50dcadea631 Mon Sep 17 00:00:00 2001 From: Matrix-X Date: Wed, 24 Nov 2021 11:28:05 +0800 Subject: [PATCH] fix(carbon): upgrade v1.5.5 --- carbon/carbonDatetime.go | 2 +- go.mod | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/carbon/carbonDatetime.go b/carbon/carbonDatetime.go index bde1793..51e8992 100644 --- a/carbon/carbonDatetime.go +++ b/carbon/carbonDatetime.go @@ -27,7 +27,7 @@ func (dt *CarbonDatetime) SetDatetime(c carbon.Carbon) { } func (dt *CarbonDatetime) SetTimezone(timezone string) *CarbonDatetime { - dt.C.Loc, dt.C.Error = time.LoadLocation(timezone) + dt.C.SetTimezone(timezone) dt.C.AddHours(8) return dt diff --git a/go.mod b/go.mod index aaaa757..370e6d9 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ module github.com/ArtisanCloud/PowerLibs -go 1.16 +go 1.17 require ( github.com/go-redis/redis/v8 v8.11.0 - github.com/golang-module/carbon v1.3.5 + github.com/golang-module/carbon v1.5.5 github.com/guonaihong/gout v0.2.9 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/stretchr/testify v1.7.0