Q
q
Not only must the year be divisible by 4, if it is a century
year it must be divisible by 400.
year it must be divisible by 400.
Gerry Quinn said:In countries where little or no effort was put into preventing it, no
significant problems occurred either.
"Only the vigilance of our firefighters has prevented this 2000-year old
forest from burning to the ground dozens of times over the last decade!"
- Gerry Quinn
In said:My personal preference would be for a 256-bit number of picoseconds since
the creation of the universe. It gives better precision than 1 second.
It won't run out during the life of this universe. The only trouble is,
we don't know accurately when that was.
In said:God forbid I'm not running at least 256 bits by then.
The only reason it didn't happen was because we fixed it.
I suppose the world would have appreciated it more if we'd let
everything go to hell and then became heroes by fixing it afterward.
Villy Kruse said:I'm sure these stories didn't come from the professionals who knew
what they were talking about. Besides, the problem is just a small
subset of a bigger issue, namely the maximum number that can be stored
in a given variable. ... Or accounting programs which gets into trouble
when turnover reaches one million, or 10 million.
Corey Murtagh said:15 years after the oil runs out and we're all paying US$20/gallon for
vehicle grade alcohol :>
In said:In countries where little or no effort was put into preventing it, no
significant problems occurred either.
My personal preference would be for a 256-bit number of picoseconds since
the creation of the universe. It gives better precision than 1 second.
It won't run out during the life of this universe. The only trouble is,
we don't know accurately when that was.
Villy Kruse said:I'm sure these stories didn't come from the professionals who knew
what they were talking about. Besides, the problem is just a small
subset of a bigger issue, namely the maximum number that can be stored
in a given variable. It could for exmple be an old cash register which
didn't allow prices above 10 dollars for example. Or fuel pumps which
got into trouble when the fuel price went above 1.00. Or accounting
programs which gets into trouble when turnover reaches one million,
or 10 million. Or the position argument you give to the fseek()
function, now when files greater than 2Gig is a real posibility.
Pull your head out of the sand for a moment, and take
a look at: http://www.grantjeffrey.com/article/y2kretro.htm
Stephen said:.... snip ...
I assume that $20 is after inflation, which means it'll be on par
(in constant dollars) with what we pay for petrol or ethanol
today. Hardly a problem, though I'd expect us all to be running
on hydrogen by then; ethanol is a transition fuel.
Villy Kruse said:I'm sure these stories didn't come from the professionals who knew
what they were talking about. Besides, the problem is just a small
subset of a bigger issue, namely the maximum number that can be stored
in a given variable. It could for exmple be an old cash register which
didn't allow prices above 10 dollars for example. Or fuel pumps which
got into trouble when the fuel price went above 1.00.
[/QUOTE]Oh yeah? How about all those stories about everything from your coffee
maker to your car engine's sparkplugs stopping working on the exact
second the year 1999 changes into the year 2000?
The only reason it didn't happen was because we fixed it.
Mike said:.... snip ...
Anecdote:
Funny you should mention this. All of us U.S. folks are aware
of the current escalation in gasoline prices (I'm supposing a
similar thing is happening elsewhere.). But now, in the 21st
century, I was shocked to learn the other day that a local
gasoline retailer was losing money because his pumps didn't
have a '2' in the high order position. He said in a news
interview, that he was being 'forced' to sell at a loss, for
$1.99/gallon, although the average price was around $2.35.
He said he has to 'eat' the loss until his new pumps arrive
in a few days.
I told my wife I should go down there and sell him a few
pieces of cardboard, a crayon, and a handheld calculator,
perhaps for about $300. He'd get that back in recouped
losses in less than a day, and my wife and I could have
a very nice night out on the town.
Richard said:Really? People upgraded their coffee makers and spark plugs?
No, the reason _those_ did not happen is because coffee makers and spark
plugs don't stop working on 1-1-1900.
CBFalconer said:You (and he) are too young.
Back in gas shortage times, when
prices worked their way above 50 cents a gallon, most pumps
couldn't handle that wildly excessive level. The operators set
them to charge half-price, and created a sign stating as much.
This solution may not be complete in these days of 'charge at the
pump'.
I don't hope time_t isn't as often converted to int as size_t is. Well IStephen Sprunk said:If someone copies a time_t into a variable of any other type, they may be
invoking undefined behavior, which means it's not the Standard's problem,
it's the coder's.
time_t exists for a reason, just like size_t. Use them.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.