Skip to content

Commit

Permalink
fix: remove milliseconds from timestamps (#119)
Browse files Browse the repository at this point in the history
Signed-off-by: ayush3160 <kshitij3160@gmail.com>
  • Loading branch information
ayush3160 authored Sep 19, 2024
1 parent 24192a2 commit a84183a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions echo-mysql/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func StartHTTPServer() {
if err != nil {
return c.String(http.StatusInternalServerError, fmt.Sprintf("Failed Persisiting Entity with Error %s", err.Error()))
} else {
req.UpdatedAt = req.UpdatedAt.Truncate(time.Second)
return c.JSON(http.StatusOK, req)
}
})
Expand Down
2 changes: 1 addition & 1 deletion echo-mysql/uss/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type ShortCodeInfo struct {
UID uint64 `json:"id" sql:"AUTO_INCREMENT" gorm:"primary_key"`
ShortCode string `json:"shortcode" gorm:"uniqueIndex"`
URL string `json:"url"`
UpdatedAt time.Time `json:"updated_at"`
UpdatedAt time.Time `json:"updated_at" gorm:"datetime(0);autoUpdateTime"`
}

type USSStore struct {
Expand Down

0 comments on commit a84183a

Please sign in to comment.