diff --git a/internal/entity/license.go b/internal/entity/license.go index 2985c70..efb2b83 100644 --- a/internal/entity/license.go +++ b/internal/entity/license.go @@ -102,10 +102,8 @@ type PartnerLicense struct { } func (l *LicenseDB) ToPartnerLicense() PartnerLicense { - // Define the GMT+7 timezone location, err := time.LoadLocation("Asia/Jakarta") if err != nil { - // Handle the error appropriately, but for simplicity, we'll default to UTC location = time.FixedZone("GMT+7", 7*60*60) } @@ -141,7 +139,8 @@ func (l *LicenseDB) ToPartnerLicense() PartnerLicense { if startDateInGMT7.After(startOfDay) { licenseStatus = "INACTIVE" - } else if startDateInGMT7.Equal(startOfDay) || (startDateInGMT7.Before(startOfDay) && endDateInGMT7.After(startOfDay)) { + } else if startDateInGMT7.Equal(startOfDay) || (startDateInGMT7.Before(startOfDay) && endDateInGMT7.After(startOfDay) || + endDateInGMT7.Equal(startOfDay)) { if daysToExpire < 0 { licenseStatus = "EXPIRED" } else if daysToExpire <= 30 {