Prev: Open popup from JSP - Servlet ??
Next: XPath question.
From: Lew on 12 Mar 2010 23:00 Roedy Green wrote: > I have long railed against DST as a nutty idea. > http://mindprod.com/jgloss/dst.html .... > The story is we do it for the farmers. They strenuously opposed it > when it was introduced. It gave them one less hour before the city > markets opened. I wonder where that canard originated. It's so patently untrue. As if the cows would change when they need to be milked! Farmers work without regard for clocks, unless you count sundials. The original origin of Daylight Savings (I refuse to use the correct "Daylight Saving") was to eke an extra hour of work out of factory workers without having to pay for lighting. This was in the days before architecture changed and made cooling much more expensive than lighting. You are correct that people die or get injured in the spring-forward time change. I've read that it has something to do with losing an hour's sleep that weekend (this coming weekend, here). DST was the source of a bug in a J2EE system I worked on a couple of years ago. The code calculated whether a customer was more than seven days late with a form using the naive calculation of so many seconds per day, and local time. Tsk, tsk. -- Lew
From: George Neuner on 13 Mar 2010 03:01 On Fri, 12 Mar 2010 23:00:53 -0500, Lew <noone(a)lewscanon.com> wrote: >The original origin of Daylight Savings (I refuse to use the correct "Daylight >Saving") was to eke an extra hour of work out of factory workers without >having to pay for lighting. This was in the days before architecture changed >and made cooling much more expensive than lighting. Undoubtedly it quickly evolved into a business issue, but I thought the original use was wartime fuel conservation. AFAIK, WWI Germany was the first country to use daylight saving - to save coal. George
From: Arved Sandstrom on 13 Mar 2010 07:20 laredotornado wrote: > On Mar 12, 9:22 am, Thomas Pornin <por...(a)bolet.org> wrote: >> According to laredotornado <laredotorn...(a)zipmail.com>: >> >>> I'm using Java 1.5. I have a java.util.Date object and I would like >>> to determine if it's date (i.e. year, month, and day) are greater than >>> (in the future) or equal to today's date (year, month, and day). >>> However, I don't care about any time component (hour, minute, >>> second ...) when the comparison is taking place. What is the easiest >>> way I can determine this? >> If you are in the UTC time zone (often called GMT too), then this >> is simple. Use this: >> >> public static int dayCount(Date d) >> { >> return (int)(d.getTime() / 86400000L); >> } >> >> which returns the date as an integral count of days since January 1st, >> 1970. You then just have to compare those day counts. >> >> For other time zones, you will have to resort to Calendar and >> TimeZone. Create a TimeZone instance for your time zone, then get >> a Calendar instance (with Calendar.getInstance(TimeZone)), and use >> it to convert your dates into years, months and days. >> >> --Thomas Pornin > > Thanks. This is just the simple solution I was looking for. One > follow up . Why is the timezone important? If I know that both my > Date objects are the same time zone, wouldn't it still work even if > that time zone weren't GMT? - Dave The actual timezone _isn't_ important, not in the sense that you mean. All you need for *any* timezone TZ is a calculation method X that gives you integral days for a date, from an epoch. It just so happens that for GMT the calculation method X is quite simple, as Thomas points out - for the others you resort to the APIs. AHS
From: Lew on 13 Mar 2010 12:52 George Neuner wrote: > On Fri, 12 Mar 2010 23:00:53 -0500, Lew <noone(a)lewscanon.com> wrote: > >> The original origin of Daylight Savings (I refuse to use the correct "Daylight >> Saving") was to eke an extra hour of work out of factory workers without >> having to pay for lighting. This was in the days before architecture changed >> and made cooling much more expensive than lighting. > > Undoubtedly it quickly evolved into a business issue, but I thought > the original use was wartime fuel conservation. AFAIK, WWI Germany > was the first country to use daylight saving - to save coal. You're right, but that is saying the same thing. I didn't say "business" or "peacetime" factory workers. How did it save coal for Germany? They may have claimed that was the reason, but what savings could there have been? It took the same amount of coal to make steel in daytime or nighttime - the only difference would have been to provide lighting back in those days. -- Lew
From: George Neuner on 13 Mar 2010 16:17 On Sat, 13 Mar 2010 12:52:38 -0500, Lew <noone(a)lewscanon.com> wrote: >George Neuner wrote: >> On Fri, 12 Mar 2010 23:00:53 -0500, Lew <noone(a)lewscanon.com> wrote: >> >>> The original origin of Daylight Savings (I refuse to use the correct "Daylight >>> Saving") was to eke an extra hour of work out of factory workers without >>> having to pay for lighting. This was in the days before architecture changed >>> and made cooling much more expensive than lighting. >> >> Undoubtedly it quickly evolved into a business issue, but I thought >> the original use was wartime fuel conservation. AFAIK, WWI Germany >> was the first country to use daylight saving - to save coal. > >You're right, but that is saying the same thing. I didn't say "business" or >"peacetime" factory workers. > >How did it save coal for Germany? They may have claimed that was the reason, >but what savings could there have been? It took the same amount of coal to >make steel in daytime or nighttime - the only difference would have been to >provide lighting back in those days. I can only speculate because what I have read and seen in television documentaries has been short on specifics. At the time Germany was the world's leader in making coal derivatives: synthetic machine fuels and oils, gas for lighting and heating, chemicals (including explosives and medicines), pigments, dies, etc. Much of the economy revolved around coal in one way or another - it wasn't just used for making steel. In 1915, many German cities and towns were lit and heated by coal gas. Whether lighting was by coal gas or electric generated by burning coal, either way extended afternoon daylight would cut into that use. Also a good part of Germany is mountainous so it may have had some impact on heating as well in the Spring and Fall - the sun shines the same amount regardless of the clock, but time does seem to affect when people feel cold. Germany was rather late in abandoning general use of coal fuels - because they had lots of coal but little oil or natural gas of their own. Following WWI, much of Germany's industry was dismantled - at the start of WWII, most of the coal related industries were gone and fossil oil had become the main fuel. Hitler tried to revive coal fuel production when Germany's oil reserves were dwindling. After taking Poland, France and Checkoslovakia, Germany had coal reserves coming out of its ears but it didn't have a great deal of oil until invading Georgia (and they never got much benefit from the Georgian fields due to sabotage). George
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: Open popup from JSP - Servlet ?? Next: XPath question. |