The attodo.app, uhh... app.

timezones are hard

+11 -9
+5 -4
internal/handlers/lists.go
··· 208 } 209 210 // Create new list 211 list := &models.TaskList{ 212 Name: name, 213 Description: r.FormValue("description"), 214 TaskURIs: []string{}, // Empty initially 215 - CreatedAt: time.Now(), 216 - UpdatedAt: time.Now(), 217 } 218 219 // Build record ··· 330 list.Name = name 331 } 332 list.Description = r.FormValue("description") 333 - list.UpdatedAt = time.Now() 334 335 // Handle task URI updates if provided 336 if taskURIsJSON := r.FormValue("taskUris"); taskURIsJSON != "" { ··· 436 } 437 438 // Update timestamp 439 - list.UpdatedAt = time.Now() 440 441 // Build record and update 442 updatedRecord := buildListRecord(list)
··· 208 } 209 210 // Create new list 211 + now := time.Now().UTC() 212 list := &models.TaskList{ 213 Name: name, 214 Description: r.FormValue("description"), 215 TaskURIs: []string{}, // Empty initially 216 + CreatedAt: now, 217 + UpdatedAt: now, 218 } 219 220 // Build record ··· 331 list.Name = name 332 } 333 list.Description = r.FormValue("description") 334 + list.UpdatedAt = time.Now().UTC() 335 336 // Handle task URI updates if provided 337 if taskURIsJSON := r.FormValue("taskUris"); taskURIsJSON != "" { ··· 437 } 438 439 // Update timestamp 440 + list.UpdatedAt = time.Now().UTC() 441 442 // Build record and update 443 updatedRecord := buildListRecord(list)
+2 -2
internal/handlers/render.go
··· 20 "formatDate": func(t interface{}) string { 21 switch v := t.(type) { 22 case time.Time: 23 - return v.Format("Jan 2, 2006 3:04 PM") 24 case *time.Time: 25 if v != nil { 26 - return v.Format("Jan 2, 2006 3:04 PM") 27 } 28 return "" 29 default:
··· 20 "formatDate": func(t interface{}) string { 21 switch v := t.(type) { 22 case time.Time: 23 + return v.Local().Format("Jan 2, 2006 3:04 PM") 24 case *time.Time: 25 if v != nil { 26 + return v.Local().Format("Jan 2, 2006 3:04 PM") 27 } 28 return "" 29 default:
+4 -3
internal/handlers/tasks.go
··· 152 } 153 154 // Create task record 155 record := map[string]interface{}{ 156 "$type": TaskCollection, 157 "title": title, 158 "description": description, 159 "completed": false, 160 - "createdAt": time.Now().Format(time.RFC3339), 161 } 162 163 // Try to create record with retry logic ··· 183 Title: title, 184 Description: description, 185 Completed: false, 186 - CreatedAt: time.Now(), 187 RKey: rkey, 188 URI: output.Uri, 189 } ··· 235 236 // Update completedAt based on completion status 237 if task.Completed { 238 - now := time.Now() 239 task.CompletedAt = &now 240 } else { 241 task.CompletedAt = nil
··· 152 } 153 154 // Create task record 155 + now := time.Now().UTC() 156 record := map[string]interface{}{ 157 "$type": TaskCollection, 158 "title": title, 159 "description": description, 160 "completed": false, 161 + "createdAt": now.Format(time.RFC3339), 162 } 163 164 // Try to create record with retry logic ··· 184 Title: title, 185 Description: description, 186 Completed: false, 187 + CreatedAt: now, 188 RKey: rkey, 189 URI: output.Uri, 190 } ··· 236 237 // Update completedAt based on completion status 238 if task.Completed { 239 + now := time.Now().UTC() 240 task.CompletedAt = &now 241 } else { 242 task.CompletedAt = nil