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

Mark the planned end date read from the database as a local timestamp #69

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

ianmcorvidae
Copy link
Member

I think this is the fix for the time-limit endpoint issue. The timestamps in the DB were set correctly, but the way we were reading them in assumed UTC, where they are actually local timestamps. Calling .Local() doesn't change timestamps in go, merely marks them as belonging to the local timezone, so this should cause them to start being returned correctly after being converted to unix epoch values.

@ianmcorvidae ianmcorvidae force-pushed the update-time-limit-endpoint branch from 0b3ff2a to 522710a Compare September 18, 2024 21:47
@ianmcorvidae ianmcorvidae force-pushed the update-time-limit-endpoint branch from 522710a to 91c5cf5 Compare September 18, 2024 21:48
Copy link
Member

@slr71 slr71 left a comment

Choose a reason for hiding this comment

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

LGTM!

@ianmcorvidae
Copy link
Member Author

Looks like I had misunderstood Local(), so this is now updated again to apply the timezone offset as well as marking it local. I'm not sure the marking local matters all that much at this point, but it still seems correct.

@ianmcorvidae
Copy link
Member Author

After the updates, I'm going to go ahead and merge this to test with in QA.

@ianmcorvidae ianmcorvidae merged commit 7504aa5 into cyverse-de:main Sep 19, 2024
3 checks passed
@ianmcorvidae ianmcorvidae deleted the update-time-limit-endpoint branch September 19, 2024 17:31
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