Club Admiralty

v7.3 - moving along, a point increase at a time

Club Admiralty Blog

A blog about life in general, in as many languages as I can manage. Ενα ιστολόγιο περι ζωής, πολυγλωσσο - σε όσες γλωσσες εχω μεράκι να γράψω.

Newton and the 2010 Bug: What it is

NewtonLogoBW
Well, the NewtonTalk list has been buzzing lately about the Y2K10 bug that is going to plague Newtons come next year. So what is it? It's similar to the Y2K bug (or oversight depending how you look at it) that was a headache on our computers not so long ago.

Here is an explanation from Andrei:



The basic issue is that the time calculations that deal with time containing
seconds work with integers, and as of January 5th, 2010 the number of
secondsthat have gone by since January 1, 1993 is greater than an integer
canhandle.

The Newton uses two formats for dates, number of minutes since January 1,
1904 and the number of seconds since 1993. It appears that the problem lies
with the functions dealing with the date in seconds, the date functions that
deal with years, months, and days have plenty of space left.  It looks like
the value is stored in a 29 bit value. All hell should break loose at second
2**29 which would be January 5, 2010 at 18:48:31.

The system routine TimeInSecondsToTime() returns an unexpected value.
If you give it the largest 29 bit value it gives a correct answer, but if you give
it a 30 bit number it screws up.
But the routines that handle date conversions handle the later dates.
 Comments
Stacks Image 18

Archive

 %08/%2025 (3)
 %07/%2025 (2)
 %05/%2025 (2)
 %04/%2025 (1)
 %01/%2025 (4)
 %12/%2024 (18)
 %11/%2024 (1)
 %09/%2024 (1)
 %08/%2024 (6)
 %07/%2024 (8)
 %04/%2024 (2)
 %12/%2023 (10)
 %11/%2023 (14)
 %10/%2023 (4)
 %09/%2023 (4)
 %08/%2023 (3)
 %07/%2023 (1)
 %06/%2023 (11)
 %04/%2023 (5)
 %02/%2023 (2)
 %12/%2022 (10)
 %11/%2022 (9)
 %10/%2022 (6)
 %09/%2022 (8)
 %08/%2022 (1)
 %07/%2022 (6)
 %06/%2022 (7)
 %05/%2022 (6)
 %04/%2022 (7)
 %03/%2022 (8)
 %02/%2022 (3)
 %01/%2022 (10)
 %12/%2021 (19)
 %11/%2021 (14)
 %10/%2021 (12)
 %09/%2021 (16)
 %08/%2021 (20)
 %07/%2021 (8)
 %06/%2021 (2)
 %05/%2021 (1)
 %02/%2021 (1)
 %01/%2021 (6)
 %12/%2020 (4)
 %11/%2020 (3)
 %10/%2020 (3)
 %09/%2020 (4)
 %08/%2020 (3)
 %07/%2020 (4)
 %06/%2020 (15)
 %05/%2020 (11)
 %04/%2020 (1)
 %03/%2020 (8)
 %02/%2020 (13)
 %01/%2020 (6)
 %12/%2019 (18)
 %11/%2019 (14)
 %10/%2019 (2)
 %09/%2019 (9)
 %08/%2019 (6)
 %07/%2019 (10)
 %06/%2019 (9)
 %05/%2019 (8)
 %04/%2019 (11)
 %03/%2019 (17)
 %02/%2019 (6)
 %01/%2019 (4)
 %12/%2018 (9)
 %11/%2018 (9)
 %10/%2018 (8)
 %08/%2018 (2)
 %05/%2018 (15)
 %04/%2018 (21)
 %03/%2018 (30)
 %02/%2018 (31)
 %01/%2018 (22)
 %12/%2017 (21)
 %11/%2017 (25)
 %10/%2017 (20)
 %09/%2017 (24)
 %08/%2017 (25)
 %07/%2017 (30)
 %06/%2017 (33)
 %05/%2017 (27)
 %04/%2017 (28)
 %03/%2017 (32)
 %02/%2017 (31)
 %01/%2017 (28)
 %12/%2016 (32)
 %11/%2016 (35)
 %10/%2016 (28)
 %09/%2016 (27)
 %08/%2016 (28)
 %07/%2016 (32)
 %06/%2016 (34)
 %05/%2016 (32)
 %04/%2016 (36)
 %03/%2016 (31)
 %02/%2016 (37)
 %01/%2016 (28)
 %12/%2015 (28)
 %11/%2015 (26)
 %10/%2015 (17)
 %09/%2015 (13)
 %08/%2015 (14)
 %07/%2015 (8)
 %06/%2015 (7)
 %05/%2015 (5)
 %04/%2015 (9)
 %03/%2015 (3)
 %02/%2015 (4)
 %01/%2015 (3)
 %12/%2014 (4)
 %11/%2014 (9)
 %10/%2014 (2)
 %09/%2014 (4)
 %08/%2014 (1)
 %07/%2014 (3)
 %06/%2014 (3)
 %05/%2014 (3)
 %04/%2014 (3)
 %03/%2014 (3)
 %02/%2014 (1)
 %01/%2014 (1)
 %12/%2013 (3)
 %11/%2013 (1)
 %10/%2013 (7)
 %09/%2013 (3)
 %08/%2013 (5)
 %07/%2013 (9)
 %06/%2013 (3)
 %05/%2013 (3)
 %04/%2013 (7)
 %03/%2013 (5)
 %02/%2013 (4)
 %01/%2013 (1)
 %12/%2012 (4)
 %11/%2012 (2)
 %10/%2012 (8)
 %09/%2012 (9)
 %08/%2012 (7)
 %07/%2012 (5)
 %06/%2012 (12)
 %05/%2012 (6)
 %04/%2012 (6)
 %03/%2012 (10)
 %02/%2012 (14)
 %01/%2012 (11)
 %12/%2011 (9)
 %11/%2011 (15)
 %10/%2011 (15)
 %09/%2011 (11)
 %08/%2011 (13)
 %07/%2011 (16)
 %06/%2011 (6)
 %05/%2011 (13)
 %04/%2011 (9)
 %03/%2011 (8)
 %02/%2011 (8)
 %01/%2011 (7)
 %12/%2010 (6)
 %11/%2010 (1)
 %10/%2010 (1)
 %09/%2010 (5)
 %08/%2010 (10)
 %07/%2010 (21)
 %06/%2010 (24)
 %05/%2010 (15)
 %04/%2010 (11)
 %03/%2010 (3)
 %02/%2010 (6)
 %01/%2010 (12)
 %12/%2009 (23)
 %11/%2009 (15)
 %10/%2009 (19)
 %09/%2009 (32)
 %08/%2009 (31)
 %07/%2009 (35)
 %06/%2009 (38)
 %05/%2009 (25)
 %04/%2009 (3)
 %03/%2009 (18)
 %02/%2009 (25)
 %01/%2009 (37)
 %12/%2008 (45)
 %11/%2008 (49)
 %10/%2008 (49)
 %09/%2008 (32)
 %08/%2008 (22)
 %07/%2008 (19)
 %06/%2008 (26)
 %05/%2008 (47)
 %04/%2008 (81)
 %03/%2008 (62)
 %02/%2008 (28)
 %01/%2008 (15)
 %12/%2007 (33)
 %11/%2007 (16)
 %10/%2007 (11)
 %09/%2007 (4)
 %08/%2007 (6)
 %07/%2007 (17)
 %06/%2007 (9)
 %05/%2007 (50)
 %04/%2007 (77)
 %03/%2007 (48)
 %02/%2007 (27)
 %01/%2007 (29)
 %12/%2006 (35)
 %11/%2006 (28)
 %10/%2006 (19)
 %09/%2006 (14)
 %08/%2006 (33)
 %07/%2006 (22)
 %06/%2006 (25)
 %05/%2006 (40)
 %04/%2006 (49)
 %03/%2006 (38)
 %02/%2006 (37)
 %01/%2006 (14)
 %12/%2005 (17)
 %11/%2005 (11)
 %10/%2005 (14)
 %09/%2005 (12)
 %08/%2005 (1)
 %07/%2005 (1)
 %06/%2005 (2)
 %05/%2005 (1)
 %04/%2005 (2)
 %01/%2005 (1)
 %11/%2004 (1)
 %10/%2004 (2)
 %08/%2004 (2)
 %07/%2004 (4)
 %05/%2004 (2)
 %03/%2004 (2)
 %02/%2004 (2)
 %01/%2004 (2)
 %12/%2003 (2)
 %06/%2003 (2)
 %09/%2000 (3)
 %05/%2000 (2)
 %04/%2000 (1)
 %02/%2000 (1)
Stacks Image 20