-
Notifications
You must be signed in to change notification settings - Fork 220
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
Display start and due date-time for assessment according to system timezone #2170
Conversation
WalkthroughWalkthroughThe Changes
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Additional comments not posted (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
I was unable to recreate the issue on my end (the timezones were correct previously), but I don't see any issues with the changes provided. LGTM |
Description
As described in #2169, the displayed date-time is not in the correct timezone as the system. This change convert the date object to the local time zone before formatting it into a string.
Motivation and Context
To resolve this, I adjusted the
date_to_s
method inmodels/assessment.rb
to utilize thegetlocal
method, which should fetch the system's timezone. This ensures the date and time are displayed correctly according to the system's local timezone.How Has This Been Tested?
I have tested this fix on my end with system time zone set to Asia/Shanghai, and the date and time are now displayed correctly.
Types of changes
Checklist:
overcommit --install && overcommit --sign
to use pre-commit hook for lintingOther issues / help required
If unsure, feel free to submit first and we'll help you along.