Skip to content

Serialise dates to UTC #811

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

Closed
wants to merge 5 commits into from
Closed

Serialise dates to UTC #811

wants to merge 5 commits into from

Conversation

via-guy
Copy link

@via-guy via-guy commented Feb 25, 2021

If a DateTime object is serialised for an HTTP request but it's not in UTC then the ISO8601 string will be invalid, as it won't contain the timezone (missing from the dart implementation of DateTime). This causes requests to either fail or use the server timezone, which may not be the same as that of the device.

I know that I better solution would be to fix the DateTime function toIso8601String, but this is an easy solution here.

@google-cla
Copy link

google-cla bot commented Feb 25, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla
Copy link

google-cla bot commented Feb 25, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@via-guy
Copy link
Author

via-guy commented Feb 25, 2021

@googlebot I signed it!

@google-cla
Copy link

google-cla bot commented Feb 25, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@guykogus
Copy link

@googlebot I consent.

@kevmoo
Copy link
Collaborator

kevmoo commented Feb 26, 2021

I'm hesitant to take this PR, just because it changes the behavior of something that's been VERY stable for a long time.

I think I'd rather consider using toIso8601String in a breaking change...

Want to open an issue for that?

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