John J. Hughes II <(E-Mail Removed)> wrote:
> Thanks for the response.
>
> It's not in a loop and only really used once so....
>
> I put the hours/minutes/seconds so the compiler would not do anything
> stupid, I try never to assume it will default to zero. That is when time_t
> starts so I want it to be correct.
If you're going to assume that documentation is wrong, you're in for a
world of pain. The documentation for DateTime(int,int,int) specifically
states that the time is set to midnight.
> I am using abs because according to the documents the total seconds function
> return a decimal with the partial seconds.
A double, actually.
> I figured it would be safer to strip them before converting.
But Abs is to do with making values non-negative, not to do with
stripping anything.
I'd just cast to uint or int, personally.
--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too