Bug 6154 - TimeSpan's "Total..." properties are empty.
Summary: TimeSpan's "Total..." properties are empty.
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: 4.2.x
Hardware: Macintosh Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-07-17 09:45 UTC by NeoDarque
Modified: 2012-08-07 14:11 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description NeoDarque 2012-07-17 09:45:58 UTC
TimeSpan seems to be broken.

When doing for instance TimeSpan.FromMinutes(1).TotalMilliseconds, it returns '0' the same is true also for all other "Total" properties on TimeSpan.
Comment 1 Atsushi Eno 2012-08-07 06:30:12 UTC
I verified TimeSpan.FromMinutes(1).TotalMilliseconds correctly returns 60 by the example code below, based on the default application project, replacing button.Click event content with:

button.Text = TimeSpan.FromMinutes (1).TotalSeconds.ToString ();

If you still see broken Total* values, please provide actual code that results in that.
Comment 2 NeoDarque 2012-08-07 14:11:21 UTC
With the latest version this now seems to work.

(The debugger in Visual Studio, still displays 0 for all those values when hovering over a timespan variable though, but when assigning to another variable it gets the correct value.)