Neil Williams: 2038 overflows
Adrian (also sent by email):Re: 2038 issues on mobile platforms.
It is possible to handle 64bit time on 32bit systems. I got disillusioned with the libglib2.0-0 support (GDate) and I already had a library capable of 64bit mathematics (libqof1) so I wrote QofDate and QofTime that can handle true 64bit date and time calculations, formatting and scanning on 32bit or 64bit installations. I estimate that this gives us enough capacity to handle time for a couple of dozen times the age of the universe to nanosecond precision. The maths can also go backwards as far as it can go forwards so it could handle the date of the Big Bang with nanosecond precision too - if anybody actually works that out.
I'll be using this library in Emdebian to provide support for 64bit maths for gpe-expenses and the pre-alpha gpe-cash (stripped out gnucash for embedded devices) so at least your financial records will be safe.
http://cashutil.sourceforge.net/gpecash.php
http://gpe-expenses.sourceforge.net/
"QofTime is a lot like the unix 'struct timespec' except that it uses a
64-bit signed int to store the seconds. This should adequately cover
dates in the distant future as well as the distant past, as long as
these are not more than a couple of dozen times the age of the
universe. Values of this type can range from -9,223,372,036,854,775,808
to 9,223,372,036,854,775,807."
http://qof.sourceforge.net/doxy/group__QOFTIME.html#gb93e930907d0e2eba07b1fa7496e7822
http://qof.sourceforge.net/doxy/group__QOFTIME.html
QofTime is defined as 64bit on all systems and will not overflow until
the year 292,471,208,679 (not counting leap years). i.e. approx.
9223372036854775808 / (60*60*24*365). This also means that some values
of QofTime cannot be converted to a time_t on systems where time_t is
defined as 32bit.
http://qof.sourceforge.net/doxy/group__Date.html
A QofDate is theoretically able to go forward to the year
292,471,206,707 AD and back to the year 292,471,206,708 BC. Whether
such dates actually exist is outside the scope of this documentation.
http://packages.debian.org/sid/libqof-doc
http://packages.debian.org/sid/libqof1
So we finally need 64 bit CPUs in all our gadgets!
(After having seen OpenXchange's SyncML code fail horribly on dates that are
beyond 2038, which is something you quickly arrive at if people enter birthdays
as repeating appointments until infinity.)
Update: Neil Williams has some
Over the weekend I spent some time hacking on
Thanks to Dan Williams for answering my stupid questions about Network
Manager.
While it's cute that
Working with subversion I’ve had a bit trouble making project wide search and replaces.
We watched either parts or the entire three matches yesterday. So, long
report..:-)
The day began with the most unbalanced game of this world cup, featuring New
Zealand, world's top rugby team, against Portugal, ranked 22nd. Rugby in
Portugal is played by about 4200 people only, in less than 50 clubs. All
players are amateur but one (Gon alvo Uva, playing in Montpellier, France),
being dentists, students, etc...and coming to RWC during their holidays. The
result (108-13 and 16 tries) was expected but the feeling when Portugal
scored a try was great, with the 40,000 attendees in Lyon supporting
Portugal. Personnally, I had great time chatting on IRC with Miguel
Figueiredo, one of the leaders of the portuguese l10n team in Debian, during
the match.
We watched Wales-Australia (20-32) during the evening. That game was obviously the
key match of this pool, with the winner very probably finishing 1st in the
pool. Wales playing in Millenium Stadium in Cardiff is always astonishing
and show how much the Welsh people love this sport. During 1st half,
Australia strongly dominated and logically lead 25-3 with 3 tries. Berrick
Barnes, their new fly half (Stephen Larkham injured), is a very promising
player and, imho, the match's MVP (even after being severely bashed by
Gareth Thomas on Australia's first try). After half time, the Welsh team
courageously fought and came back to 13-25, menacing Australia which was
more hesitating. Unfortunately, Australia scored a try after a big mistake
by Stephen Jones. So, even with good play by Wales and another try by the
incredible wing player Shane Williams, Australia logically won this game.
Again, a southern hemisphere team dominated a northern hemisphere one. This
is probably what will happen during this entire WC and I bet that New
Zealand, Australia and South Africa will end up in semi-finals, quite
probably along with Argentina, unless France does a miracle and ends up 1st
in their pool. I think that Australia is slightly weaker than NZ and RSA,
though. So, my current bet is NZ-RSA for the final (this can happen, given
their respective track to the final and given that they certainly will end
up first of their respective pools).
Finally, we watched the second half of Ireland-Georgia (14-10). *That* was quite a
surprise. Ireland was very close to lose this game with Georgian forwards
crushing them repeatedly at the end of the match and nearly scoring a try
that would have made them win. Everybody was waiting for Georgia to swell
after their strong 1st half (3-7) but they managed to fight until the last
second, supported by Bordeaux 40,000 attendees (minus a few thousands of
Irish supporters, of course). So, while the initial question was whether
Ireland would score a bonus point, the final question became about them to
*win* the match. This gives even more credit to Argentina's victory last
Tuesday. Full standing ovation for Georgia at the end of the match.
Today is again a busy day. I'll probably skip Fidji-Canada (which happens at
the same time than France-Namibia) but certainly won't miss Samoa-Tonga and,
of course, France-Namibia. Samoa have to win to keep their chances of
qualifying (they can beat England, really) and, well, France has of course
to win *and* score a bonus point. In this world cup where to so-called
"small" teams are not that small, everything can happen and France is
anything but safe, ehre.
I had an anonymous comment on

It's sometimes funny what automatically added advertisements can
produce. This morning when I complained about lack of Windows developers
for Gammu
and shared my unwillingness to work on Windows,