Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET constant for number of seconds in a day?

Does .NET have a constant for the number of seconds in a day (86400)?

like image 818
lance Avatar asked Jan 25 '10 23:01

lance


People also ask

How many seconds are there in a day?

Number of seconds in a regular day is 86400. But the days when DST changes happen may be shorter or longer. However, writing 24*60*60 is not a bad practice at all, and it is most likely to be in-lined by the compiler, too!

Is the number of seconds in a day constant in Microsoft Edge?

It isn't a constant, the number of seconds in a day varies depending on the day and the timezone. Thus it isn't something that Microsoft is likely to offer. Show activity on this post. Thanks for contributing an answer to Stack Overflow!

When should I use constant values defined in other code?

Use caution when you refer to constant values defined in other code such as DLLs. If a new version of the DLL defines a new value for the constant, your program will still hold the old literal value until it is recompiled against the new version. Multiple constants of the same type can be declared at the same time, for example:

How do you declare multiple constants of the same type?

Multiple constants of the same type can be declared at the same time, for example: class Calendar2 { public const int Months = 12, Weeks = 52, Days = 365; }. The expression that is used to initialize a constant can refer to another constant if it does not create a circular reference.


1 Answers

It's not a constant value

http://en.wikipedia.org/wiki/Leap_second

like image 92
Jason Avatar answered Nov 07 '22 13:11

Jason