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

DateTime.difference example doesn't take daylight-saving into account. #16527

Closed
floitschG opened this issue Feb 4, 2014 · 2 comments
Closed
Assignees
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-core type-documentation A request to add or improve documentation

Comments

@floitschG
Copy link
Contributor

The DateTime.difference example currently is:
===
DateTime berlinWallFell = new DateTime(1989, DateTime.NOVEMBER, 9);
DateTime dDay = new DateTime(1944, DateTime.JUNE, 6);

Duration difference = berlinWallFell.difference(dDay);
assert(difference.inDays == 16592);
===

This won't work for Australia (where berlinWallFell would be in summer-time, and dDay in winter-time).

The comment should probably remind that differences on non-UTC date-times don't always yield what you expect.

@lrhn
Copy link
Member

lrhn commented Feb 17, 2014

Set owner to @lrhn.
Added Started label.

@kwalrath
Copy link
Contributor

kwalrath commented Jun 4, 2014

Removed Type-Defect, Area-Documentation labels.
Added Type-Documentation, Area-Library, Library-Core labels.

@floitschG floitschG added type-documentation A request to add or improve documentation Priority-Unassigned area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-core labels Jun 4, 2014
@lrhn lrhn closed this as completed Dec 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-core type-documentation A request to add or improve documentation
Projects
None yet
Development

No branches or pull requests

4 participants