É 'cal' quebrado? O que aconteceu em setembro de 1752?

27

Se você olhar para a saída de cal 9 1752 , verá esta saída estranha:

   September 1752
 S  M Tu  W Th  F  S
       1  2 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

A seguinte história intitulada " cal 9 1752 explicado "" foi copiado de uma lista de notícias no início dos anos 90 e arquivado em Coleções de coisas engraçadas para uma audiência de computador por David G. Wiseman (gerente de rede do Departamento de Ciência da Computação da Universidade de Western Ontario).

The guy that originally wrote the "cal" command on some old Version 7 machine had an off-by-one error in his code. This showed up as some erroneous output when a malloc'd variable overwrote 12 extra bytes with zeroes, thus leading to the strange calendar output seen above.

Now, nobody in his right mind really cares about the calendar for September 1752. Even the idea of the year 1752 does not exist under UNIX, because time did not begin for UNIX until early 1970. As a result, nobody even knew that "cal" had this error until much later. By then there were thousands of copies of "cal" floating around, many of them binary-only. It was too late to fix them all.

So in mid-1975, some high-level AT&T officials met with the Pope, and came to an agreement. The calendar was retroactively changed to bring September 1752 in line with UNIX reality. Since the calendar was changed by counting backwards from September 14, 1752, none of the dates after that were affected. The dates before that were all moved by 12 days. They also fixed the man page for "cal" to document the bug as a feature.

The 11 days from September 3 to September 13 were simply gone from the records. They searched the history books and found that fortunately nothing of much significance happened during those 11 days.

Overall, this whole incident was pretty much a non-event. One science fiction author later heard about it, and blew the thing up into a full-length work of science-fiction called "The Lathe of Heaven", a book that in my opinion bears little resemblance to what really happened.

Qual é a explicação real para a anomalia de saída?

    
por LanceBaynes 02.08.2011 / 17:35

2 respostas

48

Para traçar a história real, tente executar man cal você mesmo:

The Gregorian Reformation is assumed to have occurred in 1752 on the 3rd
of September.  By this time, most countries had recognized the reforma-
tion (although a few did not recognize it until the early 1900’s.)  Ten
days following that date were eliminated by the reformation, so the cal-
endar for that month is a bit unusual.

Em seguida, se a sua história for incompleta, continue na Wikipédia para obter informações sobre as alterações introduzidas pelo Calendário gregoriano e sua história de adoção em várias partes do mundo:

The Gregorian calendar reform contained two parts, a reform of the Julian calendar as used up to Pope Gregory's time, together with a reform of the lunar cycle used by the Church along with the Julian calendar for calculating dates of Easter.
[...]
In addition to the change in the mean length of the calendar year from 365.25 days (365 days 6 hours) to 365.2425 days (365 days 5 hours 49 minutes 12 seconds), a reduction of 10 minutes 48 seconds per year, the Gregorian calendar reform also dealt with the past accumulated difference between these lengths.
[...]
Because of the Protestant Reformation, however, many Western European countries did not initially follow the Gregorian reform, and maintained their old-style systems. Eventually other countries followed the reform for the sake of consistency, but by the time the last adherents of the Julian calendar in Eastern Europe (Russia and Greece) changed to the Gregorian system in the 20th century, they had to drop 13 days from their calendars, due to the additional accumulated difference between the two calendars since 1582.
[...]
Britain and the British Empire (including the eastern part of what is now the United States) adopted the Gregorian calendar in 1752, by which time it was necessary to correct by 11 days. Wednesday, 2 September 1752 was followed by Thursday, 14 September 1752.

No momento em que o Unix apareceu e reinicializou os relógios do mundo para começar em 1º de janeiro de 1970, não havia nada a ser feito sobre toda a confusão, exceto escolher uma data para mostrar a reinicialização. Como o mundo adotou o atual sistema de calendário gregoriano em tempos variados em diferentes países, o tempo exato para fazer essa correção é algo arbitrário.

Se você já tem uma razão para contar datas que vão tão longe no seu software, você terá problemas muito mais significativos do que apenas essa redefinição! A história do calendário é cheia de surpresas!

    
por 02.08.2011 / 17:39
3

Aqui está um artigo sobre calendários (PDF ) que explica como a mudança lenta da Páscoa ao longo do ano tornou necessária essa correção de data e também descreve quando diferentes países fizeram a mudança.

Na página 904:

He [Pope Greogory] also corrected the accumulated 10-day error in the calendar by proclaiming that Thursday, October 4, 1582 C.E., the lastdate in the old style (Julian calendar), would be followed by Friday, October 15, 1582 C.E., the first day of the new style (Gregorian) calendar. Catholic countries followed this rule, but Protestant countries resisted: Spain, Portugal and Italy adopted it immediately, as did the Catholic states in Germany. The protestant parts of Germany waited until 1700 to adopt it. Great Britain and its colonies (including the United States) waited until 1752, Russia held out until after the revolution in 1918, and Bulgaria until 1920.

O artigo continua fazendo referência a uma extensa lista de datas de adoção que foi compilada por astrônomos e explica de maneira direta como converter entre diferentes sistemas de calendário.

    
por 03.08.2011 / 14:03

Tags