Skip to content

Creating a LocalTime from a TimeSpan should be simpler than it is #148

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
GoogleCodeExporter opened this issue Mar 15, 2015 · 3 comments
Closed
Milestone

Comments

@GoogleCodeExporter
Copy link

While a TimeSpan really *isn't* a time of day, bits of the BCL treat it that 
way. It would be appropriate to have LocalTime.FromTimeSpan with appropriate 
caveats, and also LocalTime.FromTicksSinceMidnight and 
LocalTime.FromSecondsSinceMidnight. The current workaround is:

    LocalTime.Midnight + Period.FromTicks(ticks)

which is pretty nasty.

Original issue reported on code.google.com by jonathan.skeet on 11 Nov 2012 at 9:18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants