ArticleslgStudy

computer science

Time formatting and storage bugs

Time formatting and storage bugs is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Time formatting and storage bugs rather than just read about it. In short: In computer science, data type limitations and software bugs can cause errors in time and date calculation or display. These are most commonly manifestations of arithmetic overflow, but can also be the result of other issues.

Key takeaways

  • Time formatting and storage bugs belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Time formatting and storage bugs to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Time formatting and storage bugs from memory before moving on to harder problems.

Reference excerpt

In computer science, data type limitations and software bugs can cause errors in time and date calculation or display. These are most commonly manifestations of arithmetic overflow, but can also be the result of other issues. The best-known consequence of this type is the Y2K problem, but many other milestone dates or times exist that have caused or will cause problems depending on various programming deficiencies.

Year 1975 On 5 January 1975, the 12-bit field that had been used for dates in the TOPS-10 operating system for DEC PDP-10 computers overflowed, in a bug known as "DATE75". The field value was calculated by taking the number of years since 1 January 1964, multiplying by 12, adding the number of months since January, multiplying by 31, and adding the number of days since the start of the month. The maximum value representable using an unsigned 12-bit integer is 212 − 1 = 4095, and the value of 4095 represents 4 January 1975: ( ( ( 11 years since 1964 ) × 12 ) + 0 months since January ) × 31 ) + 3 days since start of the month = 4095 {\displaystyle (((11{\text{ years since 1964}})\times 12)+0{\text{ months since January}})\times 31)+3{\text{ days since start of the month}}=4095}

Therefore 4 January 1975 is the latest encodable date. The "DATE-75" patch pushed the last encodable date to 1 February 2052, making the overflow date 2 February 2052, by using 3 spare bits from other fields in the file system's metadata, but this sometimes caused problems with software that used those bits for its own purposes. Some software may have supported using one additional bit for the date but had issues with additional bits, which could have resulted in some bugs on 9 January 1986.

Year 1978 Digital Equipment Corporation's OS/8 operating system for the PDP-8 computer used a signed four-bit nibble to store the number of years since 1970, and this could only represent the years 1970 to 1977. This was recognized when the COS-310 operating system was developed, and dates were recorded differently.

Year 1993 Multiple Sierra Entertainment games released for the Classic Mac OS started to freeze when running on 18 September 1993. An issue in the Mac version of Sierra's Creative Interpreter (Mac SCI) would cause the game to "lock up" when attempting to handle a delay due to a problem involving an overflow. Mac SCI would attempt to use the date to determine how long a delay should last by getting the current time in seconds since 1 January 1904, the Macintosh epoch (see: § Year 2040), and dividing by 12 hours. The division was processed by the Motorola 68000 and would not occur if an overflow was detected because of the division, but the Mac SCI would continue on regardless as if the division had occurred, eventually resulting in a delay of one second being treated as a delay of 18 hours and so on. Sierra released a patch called MCDATE that resolved the problem for almost 14 years (see: § Year 2007).

Year 1997 In Apollo Computer's Domain/OS operating system, absolute time was stored as a signed 48-bit integer representing the number of 4-microsecond units since 1 January 1980. This value overflowed on 2 November 1997, rendering unpatched systems unusable.

Year 1999 In the last few months before the year 2000, two other date-related milestones occurred that received less publicity than the then-impending Y2K problem.

First GPS rollover

GPS dates are expressed as a week number and a day-of-week number, with the week number transmitted as a ten-bit value. This means that every 1,024 weeks (about 19.6 years) after Sunday 6 January 1980, (the GPS epoch), the date resets again to that date; this happened for the first time at 23:59:47 on 21 August 1999, the second time at 23:59:42 UTC on 6 April 2019, and will happen again on 20 November 2038. To address this concern, modernised GPS navigation messages use a 13-bit field, which only repeats every 8,192 weeks (157 years), and will not return to zero until the year 2137.

9/9/99

Many legacy programs or data sets used 9/9/99 as a rogue value to indicate either an unresolved date or as a terminator to indicate no further data was in the set. This caused many systems to crash upon the arrival of 9 September 1999, the actual date this represents.

Year 2000

Two-digit year representations

The term year 2000 problem, or simply Y2K, refers to potential computer errors related to the formatting and storage of calendar data for dates in and after the year 2000. Many programs represented four-digit years with only the final two digits, making the year 2000 indistinguishable from 1900. Computer systems' inability to distinguish dates correctly had the potential to bring down worldwide infrastructures for computer reliant industries. For applications required to calculate the birth year (or another past year), such an algorithm has long been used to overcome the year 1900 problem, but it has failed to recognise people over 100 years old.

Year 2001 Systems that used a string of nine digits to record the time as seconds since the Unix epoch had issues reporting times beyond the one-billionth second after the epoch on 9 September 2001 at 01:46:40 (the "billennium"). Problems were not widespread.

Year 2007

Sierra Entertainment games for the Classic Mac OS that were patched with the MCDATE program or released afterwards with the patch built in would begin to freeze on 28 May 2007. As with the Year 1993 problem, this was due to an issue in the Mac SCI when attempting to use the date to determine how long a delay should last. Programs with the MCDATE patch freeze because the Mac SCI takes the current number of seconds since the Macintosh epoch of 1 January 1904, subtracts 432,000,000 seconds from that, and then divides by 12 hours through the Motorola 68000, to then determine how long delays should last. On 28 May 2007, the Motorola 68000 again does not divide due to overflow protection, which the Mac SCI ignores.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Time formatting and storage bugs

Start with the simplest possible case. Write down what Time formatting and storage bugs claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Time formatting and storage bugs before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Time formatting and storage bugs ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Time formatting and storage bugs

In research
Time formatting and storage bugs appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Time formatting and storage bugs in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Time formatting and storage bugs is common in secondary-school and first-year university syllabi. It links to neighbouring topics Calendars, Software bugs, Time formatting and storage bugs, so understanding it makes those chapters shorter.
In everyday life
Look for Time formatting and storage bugs outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Time formatting and storage bugs” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Time formatting and storage bugs in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Time formatting and storage bugs means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Time formatting and storage bugs out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Time formatting and storage bugs in simple terms?

In computer science, data type limitations and software bugs can cause errors in time and date calculation or display. These are most commonly manifestations of arithmetic overflow, but can also be the result of other issues.

Why does Time formatting and storage bugs matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Time formatting and storage bugs?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Time formatting and storage bugs.

Tags

  • Calendars
  • Software bugs
  • Time formatting and storage bugs

Keep exploring