Little fix to the date to timestamp conversion
This commit is contained in:
@@ -92,7 +92,7 @@ func expenseFromForm(c *gin.Context) (*expenses.Expense, error) {
|
|||||||
newDescription := c.PostForm("expense-desc")
|
newDescription := c.PostForm("expense-desc")
|
||||||
newDate := c.PostForm("expense-date")
|
newDate := c.PostForm("expense-date")
|
||||||
|
|
||||||
formattedDate, err := time.Parse("02-Jan-2006", newDate)
|
formattedDate, err := time.ParseInLocation("02-Jan-2006", newDate, time.UTC)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user