Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

TimeSpanConverter example is misleading, seems to suggest conversion from Ticks in string format, which is not correct

Open Beginner friendly
#13,135 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp
Domain
documentation

Research direction

Start with xml/System.ComponentModel.TimeSpanConverter.xml and compare the TimeSpanConverter example with the linked API page. Correct the misleading statement about ticks and the shown string conversion, then verify the updated wording across the affected documentation versions.

Written by the indexing model from the issue text.

Description

area-System.ComponentModel untriaged
Type of issue

Other (describe below)

Description

Example states

Both variables are represented in Ticks format

before converting from "5000000" to a timespan. This seems to read that the conversion will parse from the tick value of a timespan back into a TimeSpan. This is not true, TypeDescriptor.GetConverter(ts).ConvertFrom(myTSStr) treats the string format as days resulting in "5000000.00:00:00", and throwing an overflow exception if you try and do it with ticks for any timespan more than about 1 second because of what that results in in terms of ticks.

This is wrong across multiple versions of the documentation.

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.timespanconverter?view=net-10.0

Content source URL

https://github.com/dotnet/dotnet-api-docs-temp/blob/live/xml/System.ComponentModel/TimeSpanConverter.xml

Document Version Independent Id

79d7390a-d984-7fc7-aa5e-baeba420fb84

Platform Id

04e77bb7-dad8-79b0-d531-8c44a26d9c5f

Article author

@dotnet-bot

Dominant language
C#
Stars
954
Forks
1.7k
Avg merge
1d 11h
Merged PRs (30d)
61

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/dotnet-api-docs

All issues in dotnet/dotnet-api-docs

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.