-
Notifications
You must be signed in to change notification settings - Fork 455
Feature: add support for JsonSerializable.dateTimeUtc #1557
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
Conversation
Summary of ChangesHello @kevmoo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a new dateTimeUtc option to JsonSerializable for controlling DateTime serialization, along with some minor cleanups. The implementation is solid and well-tested. I've found one minor issue with the documentation for the new option that should be addressed.
| ); | ||
|
|
||
| final dateTimeUtcString = ToFromStringHelper( | ||
| 'DateTime.parse', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wanted to ask a Q here:
Should the parser also call toLocal() here?
What are the implications of not converting this to local if the DateTime object is used in the UI with a DateFormat?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to change the current behavior AT ALL.
I think the current behavior is fine.
natebosch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the linked issue:
I'll mark this to consider for the next breaking change.
Do we think that UTC is a better default? Will we update this on the next breaking release?
I see the backwards compatibility argument, and I don't think I'd want to push for a non-breaking release with the default changed, but I wonder if we should be positioning this as the recommended path with an eye to remove it in some future version.
I think it's OK to land either way, but we might also want to think about the long term story for this edge of the design and how we'll get users to that end state.
|
@natebosch – agreed. I have a long backlog of things to cleanup in the next major release. This would be one of them. |
|
...liking going to wait for augmentations to do it, though 😄 |
Fixes #1371