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

Bugfix: Fix user-session timestamp validation for IST #197

Merged
merged 2 commits into from
Jul 17, 2024

Conversation

Bahugunajii
Copy link
Member

@Bahugunajii Bahugunajii commented Jul 16, 2024

Description

  • Updated invalidate_future_date function in Utils module to use DateTime for IST conversions and comparisons.

Checklist

  • Local testing

@Bahugunajii Bahugunajii self-assigned this Jul 16, 2024
today = Date.utc_today()
utc_now = DateTime.utc_now()

ist_now = DateTime.add(utc_now, 5 * 60 * 60 + 30 * 60, :second)
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

The format we need is UTC as date_to_validate is also in UTC format. Using this will make ist_now format to look like: #DateTime<yyyy-mm-dd hh:mm:ss+05:30 IST Asia/Kolkata>

@Bahugunajii Bahugunajii merged commit 01cf6f9 into main Jul 17, 2024
1 check passed
@Bahugunajii Bahugunajii deleted the bugfix/ist-timestamp-validation branch July 17, 2024 06:27
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.

3 participants