Click here to Skip to main content
15,921,660 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: A Programming Question (Now That Chris is On Vacation) Pin
User 5924127-Mar-19 17:16
User 5924127-Mar-19 17:16 
GeneralRe: A Programming Question (Now That Chris is On Vacation) Pin
OriginalGriff27-Mar-19 22:55
mveOriginalGriff27-Mar-19 22:55 
GeneralRe: A Programming Question (Now That Chris is On Vacation) Pin
Daniel Pfeffer27-Mar-19 23:26
professionalDaniel Pfeffer27-Mar-19 23:26 
GeneralRe: A Programming Question (Now That Chris is On Vacation) Pin
PeejayAdams27-Mar-19 23:44
PeejayAdams27-Mar-19 23:44 
GeneralRe: A Programming Question (Now That Chris is On Vacation) Pin
kalberts28-Mar-19 0:13
kalberts28-Mar-19 0:13 
GeneralRe: A Programming Question (Now That Chris is On Vacation) Pin
OriginalGriff28-Mar-19 0:27
mveOriginalGriff28-Mar-19 0:27 
GeneralRe: A Programming Question (Now That Chris is On Vacation) Pin
GKP199228-Mar-19 1:59
professionalGKP199228-Mar-19 1:59 
GeneralRe: A Programming Question (Now That Chris is On Vacation) Pin
kalberts28-Mar-19 3:46
kalberts28-Mar-19 3:46 
Naah... You worry about those two bytes when you store time stamps thousands or millions of records. An OS that provides a single "current date" value does not chop off two digits to save two bytes in the single date value presented to applications. The chopping off would take far more than two bytes of code! I have worked with several OSes from the early 1970s, and they all provided 4 digit year values. If two digits were chopped off, that was done by the application, not by the real time clock in the OS.

I rather question whether a 1958 vintage system really had a real time clock at all, and an OS that at all provided the current time in a dd-mm-yyyy format. My guess is that after reboot, the operator could set the startup date/time in a single well known location, alongside with a register counting machine cyles since startup. Remember that machines of those days did not have byte addressing, and yyyymmdd in decimal format fits well within a word, even on 32 bit machines (most were 36 bits at that time). Storing yymmdd in a single word saved no space compared to yyyymmdd.

Of course MOACS itself could choose to chop off digits to save space in a million of records, probably to save magnetic tape. I doubt that it held zillions of records in memory at the same time! Also note that it is written in COBOL, The Great Promoter of BCD - PACKED DECIMAL uses 4 bits to the digit, so only a single byte would be saved by a yy format. BCD could save quite a few bytes per accounting record with lots of numeric values. Once you half the space for numeric entities by using BCD, chances are less that you go further to save a single byte by using mod 100 year values.

Anyway: In lots of applications, a time stamp is just a label; you don't do arithmetic on in. In the days of Pascal, with enumeration values as a primary non-numeric data type, I was arguing with fervor that April is not half of September, but followers of this new "C" language protested: Why not? As long as a date is just a label, there is no millenium problem. A person reading the label will know from the context that "95" is ten years before "05" rather than ninety years later.

When we entered the new millenium, quite a few people (not limited to diehard preppers!) had filled their basements with canned food and water bottles, bought freestanding propane heaters etc. expecting the entire society infrastructure to break down at midnight. We know it didn't happen, even though numerous computer systems were NOT updated to handle year 2000 - none of those I worked on, none of those I depended on. That was either because they had never cared to save those two bytes (or nibble), or that they never did date arithmetic. Or that they since long had been prepared for it, making the 100 years run from 1950 to 2050 (I saw that in a couple systems long before the Millennium Panic.

The Millennium Panic was essentially driven by users who wanted to have their systems upgraded, but those sitting on the money said "No!". By creating a big panic that the money people understood nothing of, lots of both software and hardware was updated ahead of schedule, even if it wasn't at all affected by the year. (And which hardware was millenium dependant? Lots of hardware was thrown out!) I consider at least half of the millenium issues to be fictous, just a power tool to force through updgrade that would otherwise have come significantly later.
GeneralRe: A Programming Question (Now That Chris is On Vacation) Pin
jsc4228-Mar-19 4:25
professionaljsc4228-Mar-19 4:25 
GeneralRe: A Programming Question (Now That Chris is On Vacation) Pin
kalberts28-Mar-19 6:16
kalberts28-Mar-19 6:16 
GeneralRe: A Programming Question (Now That Chris is On Vacation) Pin
Bassam Abdul-Baki28-Mar-19 0:04
professionalBassam Abdul-Baki28-Mar-19 0:04 
GeneralRe: A Programming Question (Now That Chris is On Vacation) Pin
OriginalGriff28-Mar-19 0:29
mveOriginalGriff28-Mar-19 0:29 
GeneralRe: A Programming Question (Now That Chris is On Vacation) Pin
kalberts28-Mar-19 4:01
kalberts28-Mar-19 4:01 
GeneralRe: A Programming Question (Now That Chris is On Vacation) Pin
megaadam28-Mar-19 6:06
professionalmegaadam28-Mar-19 6:06 
GeneralRe: A Programming Question (Now That Chris is On Vacation) Pin
kalberts28-Mar-19 6:37
kalberts28-Mar-19 6:37 
JokeConfused... Pin
Mike Hankey27-Mar-19 11:31
mveMike Hankey27-Mar-19 11:31 
GeneralRe: Confused... Pin
CodeWraith27-Mar-19 11:37
CodeWraith27-Mar-19 11:37 
GeneralRe: Confused... Pin
Mike Hankey27-Mar-19 11:38
mveMike Hankey27-Mar-19 11:38 
GeneralRe: Confused... Pin
Mark_Wallace27-Mar-19 12:15
Mark_Wallace27-Mar-19 12:15 
GeneralRe: Confused... Pin
GuyThiebaut27-Mar-19 22:18
professionalGuyThiebaut27-Mar-19 22:18 
GeneralRe: Confused... Pin
dandy7227-Mar-19 13:02
dandy7227-Mar-19 13:02 
GeneralRe: Confused... Pin
Marc Clifton27-Mar-19 14:31
mvaMarc Clifton27-Mar-19 14:31 
GeneralRe: Confused... Pin
Mike Hankey27-Mar-19 14:55
mveMike Hankey27-Mar-19 14:55 
GeneralRe: Confused... Pin
Clodetta del Mar28-Mar-19 0:06
Clodetta del Mar28-Mar-19 0:06 
GeneralRe: Confused... Pin
the goat in your machine27-Mar-19 15:16
the goat in your machine27-Mar-19 15:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.