diff --git a/src/cmd/__debug_bin3929517013 b/src/cmd/__debug_bin3929517013 new file mode 100755 index 0000000000000000000000000000000000000000..25396c05a516a812783616ab76a5b294b18a7e6e Binary files /dev/null and b/src/cmd/__debug_bin3929517013 differ diff --git a/src/module/pendaftaran_sidsem/internal/usecase/pendaftaran_sidsem.go b/src/module/pendaftaran_sidsem/internal/usecase/pendaftaran_sidsem.go index b23baa7c392613b29fd24ca3af34432a9d1d846e..5766007897c0369a4438d2da4be9ff4480bfe697 100644 --- a/src/module/pendaftaran_sidsem/internal/usecase/pendaftaran_sidsem.go +++ b/src/module/pendaftaran_sidsem/internal/usecase/pendaftaran_sidsem.go @@ -1,6 +1,8 @@ package usecase import ( + "fmt" + "strings" "time" "github.com/google/uuid" @@ -261,7 +263,21 @@ func (uc *PendaftaranSidSemUc) GetSidSemDetailTA(idSidsem string) (entity.Detail dosujiNames = []entity.Dosuji{} } if remDet.WaktuMulai.IsZero() { - waktuMulai = "" + waktuMulai = time.Now().String() + waktuMulai = strings.Replace(waktuMulai, " WIB", "", -1) + parts := strings.SplitN(waktuMulai, " +", 2) + if len(parts) < 2 { + fmt.Println("Invalid timestamp format") + } + + // Extract the date and time part + dateTimePart := parts[0] + // Extract the timezone offset part (first 6 characters from "+0700") + timezoneOffset := parts[1][:6] + + // Combine the date, time, and timezone offset + waktuMulai = dateTimePart + " +" + timezoneOffset + waktuMulai = strings.Replace(waktuMulai, " m", "", -1) } else { waktuMulai = remDet.WaktuMulai.String() }