-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
todo includes DateAdded in model and create action #40
base: main
Are you sure you want to change the base?
Conversation
DateTime dateCreated = DateTime.UtcNow.Date; | ||
todo.DateCreated = dateCreated; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I create something at 10pm CT, should its DateCreated
be captured as "tomorrow" because it's past midnight UTC?
Even if you want to render this as a date in the app, I'd generally treat this as a UTC timestamp of precisely when it was created. Formatting (local vs UTC, absolute vs relative time, etc) would be up to the client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed now!
TodoApi/TodoApi/TodoApi.csproj
Outdated
@@ -15,7 +15,11 @@ | |||
</PackageReference> | |||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.3" /> | |||
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.1.6" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you find this to be necessary? This should be a transitive dependency of Microsoft.AspNetCore.Identity.EntityFrameworkCore
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, it ended up not being necessary. I went ahead and removed it.
No description provided.