Re:Say Hello to Windows Azure, The World’s Most Misunderstoo...
by mibbitier on Friday April 27, 2012 @10:03AM
(#3899044)
I've been programming for 25 years or so.
Hmm dates... It's almost as if you'd want to just count the number of seconds/ms since some point in time. Then you can do arithmetic easily, don't have to worry about calendars, leap years, etc... :/
Converting a date to a human readable form is hard. There is no way on earth that computers should be storing dates in human calendar readable forms. They should only ever be converted to that format for display purposes. That is the lesson MS don't ever seem to learn.
Re:Say Hello to Windows Azure, The World’s Most Misunderstoo...
by statictype on Friday April 27, 2012 @10:57AM
(#3899319)
Converting a date to a human readable form is hard.
No, converting a date to human readable form is the easy part.
The hard part is converting the number of seconds from some epoch into a date.
The number of seconds from some reference point is not the same as a date.
Re:Say Hello to Windows Azure, The World’s Most Misunderstoo...
by sequence7 on Friday April 27, 2012 @11:23AM
(#3899448)
So if I want add a year to a date and time I just have to add the number of seconds in a year which sounds ludicrously easy I agree.
I want to know the exact date and time one year from February the 29th at 12:00 hours 2012. I want the answer to be consistent so what is the date and how many seconds do I add?
I would also like to know the exact date and time one year from February the 28th at 12:00 hours 2011. I want the answer to be consistent so what is the date and how many seconds do I add?
Re:Say Hello to Windows Azure, The World’s Most Misunderstoo...
by CurtHagenlocher on Friday April 27, 2012 @11:02AM
(#3899350)
Right. Like when you want some maintenance task to run once per month; you can just ignore the calendar and do simple arithmetic.
Dates are actually really, really hard to get right. They've been a problem for everyone for decades. When I started programming professionally about 10 years ago you'd be lucky if most programmers had even heard of UTC, let alone knew what it meant. Date bugs happen to everyone.
These days the higher order languages hide all the big problems from you. But when you get closer to the metal and you've not got someone else's library to help you it's very easy to make a mistake.