Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

selmaT273
Copy link
Contributor

No description provided.

Comment on lines 87 to 88
DateTime dateCreated = DateTime.UtcNow.Date;
todo.DateCreated = dateCreated;
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed now!

@@ -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" />
Copy link
Member

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.

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants