dotnet / dotnet/dotnet-api-docs

The described 'accurate to the nearest millisecond' behavior is out of date.

Open
#10,603 3 comments 0 reactions 0 assignees View on GitHub
area-System.DateTime Pri3 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

### Type of issue

Missing information

### Description

The document is outdated as the 'round to nearest millisecond' behavior has been deprecated, likely since adding microsecond support.

running the example now yields.

This example of TimeSpan.FromMilliseconds( double )
generates the following output.

FromMilliseconds TimeSpan
---------------- --------
1 00:00:00.0010000
1,5 00:00:00.0015000
12345,6 00:00:12.3456000
123456789,8 1.10:17:36.7898000
1234567898765,4 14288.23:31:38.7654000
1000 00:00:01
60000 00:01:00
3600000 01:00:00
86400000 1.00:00:00
1801220200 20.20:20:20.2000000

### Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.timespan.frommilliseconds?view=net-8.0

### Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System/TimeSpan.xml

### Document Version Independent Id

bc6c33fe-75bc-0191-ec1e-82ea73854f93

### Article author

@dotnet-bot

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.