Page 1 of 1

2,000th topic

Posted: Tue Aug 24, 2010 6:41 pm
by Primis
Since this is the 2,000th topic in this forum :D, lets talk about the Y2k bug, or more specifically what caused it. So I ask, how do you keep track of the time and date in your OS?

Re: 2,000th topic

Posted: Tue Aug 24, 2010 7:02 pm
by gerryg400
Since this is the 2,00th topic
That would be the Y0.2K bug.

Seriously though, to save space in my kernel, I use a single bit to represent the number of years since 2009. I've been testing for more than 12 months now and have seen no problems with this approach so far.

Re: 2,000th topic

Posted: Tue Aug 24, 2010 7:23 pm
by Primis
Whoops, typo! Fixed it though. So is that a signed bit or non? you would think people would want to access dates prior (think 30 year loan tracker).

Re: 2,000th topic

Posted: Tue Aug 24, 2010 9:42 pm
by roboman
From the jump table, item 65:

GetDate rd 1 ; 65. return : EAX=century, year, month,day, each a byte in bcd format.

Re: 2,000th topic

Posted: Tue Aug 24, 2010 11:45 pm
by Candy
At the moment, it's going to tell you "not implemented".

Re: 2,000th topic

Posted: Wed Aug 25, 2010 7:04 am
by thepowersgang
I'm just going to combo break these joke answers and give actually how I do it :)

My current method is to internally keep a Signed 64-bit count of milliseconds as the primary timestamp format. There is also a 32-bit "part-milliseconds" count that is used in the timekeeping code.
(Which makes the internal representation a 64.32 millisecond count)