-
Notifications
You must be signed in to change notification settings - Fork 449
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
Replace datetime.now() with datetime.utcnow() to match global users base #555
Comments
Thank is a very good catch 👏 Thank you for reporting it @mtreacy002 . Could you follow the user story template for consistency of issues and for whoever takes on this, is able to understand the user story and definition of done? From what I understand what we can do for future data is to use |
So, should I close this issue and use the user story template? I'm currently using the feature request template... 😂 Wasn't sure which one to use, but definitely don't think it's a bug. |
I also don't think it is a bug 😆 But its definitely something that was overlooked and should be fixed?! Its an inconsistency of data issue. No need to close the issue, you can edit it and copy the markdown format of user-story.md inside the .github/ISSUE_TEMPLATE on this repository @mtreacy002 |
Ok, will do that now 😉 |
@isabelcosta, is this ok now? I'm not sure what to put the title tag as - User story: seems to be too long for the title heading or would that be fine? Also, yes, the future data is to use the datetime.utcnow(). |
Can I work on this issue tomorrow? I have a plan tonight with the family. If I'm able to finish early with them, I'll try to work on this issue tonight. |
It's perfect :)
I will assign this to you. No need to explain you unavailability for today, take your time! I hope you enjoy your time with your family, these are tough times and nothing is more important than to spend time with your loved ones 🤗 |
Thanks, @isabelcosta. I have one other question. For registration, we're using time.time() instead of datetime.now(). Do you want me to replace this with datetime.utcnow() too or keep It as it is? |
@mtreacy002 it should be done the same way everyday. Does |
@isabelcosta. Similar to datetime.now() we've use in our existing code, the datetime.utcnow() also returns a datetime obj representation. But I can see in our code that we're using .timestamp() to change it to UNIX form. I think the reason we're using time.time() for registration is more for the 30 days cron job on automatic delete if email didn't get verified. So, I think in this sense it's ok to leave it as it is. |
Also, I'm still learning about this date and time concepts. But I noticed that we're currently using the naive objects of the datetime (regardless of .now() or .utcnow()). The suggestions I've read so far (e.g. one example here) incline towards using the timezone aware (offset-aware) object? |
Description
As a developer,
I need to use datetime.utcnow() for dealing with date/time
so that I can make sure the data on dates is stored correctly according to their timezones.
Mocks
N/A
Acceptance Criteria
Definition of Done
Estimation
1 hours
The text was updated successfully, but these errors were encountered: