Handling of DST in java  
Author Message
Raymond DeCampo





PostPosted: 2006-1-12 6:05:00 Top

java-programmer, Handling of DST in java Stefan Ram wrote:
> Raymond DeCampo <email***@***.com> writes:
>
>>Perhaps, but that is not something the government can easily
>>legislate nor enforce. (Do you really want the time police
>>checking to see if you are working an hour later?)
>
>
> Something like this is done here for the closing-time of
> stores. So, since the government already enforces
> opening-times and closing-times of stores, they could change
> these and they could change to times for schools, universities
> and their own agencies. Some other institutions then might
> follow.
>

By "here", I assume you mean Germany, based on what you wrote below.
There are no such laws in the US with the exception of some states that
have "blue laws" that only apply on Sundays.

Your suggestion sounds like a nightmare where you never know what is
going to be available when.

>
>>There is nothing sacred about the time zone.
>
>
> It is only that, given two time stamps of the legal time for
> a location in Germany, like
>
> 2005-07-10T21:38:10 and
> 1960-07-10T21:38:13
>
> it would be a typical programming task to write a routine
> that can calculate the difference between them in seconds.
> And this would be much more easy, without the need to have
> to find out all details of regulations for DST in Germany.
>
> After WWII, in Germany, there were several different zones
> controlled by different countries and some details for the DST
> differed between these zones. In one zone, there was a special
> DST with two hours added for the mid of summer. Then there are
> reports that there were years with DST even in winter. And so
> on.
>
> All these special regulations make it very difficult to
> write such a routine.
>

This is why any environment worth its salt has these routines available
in a standard library. Asking people to forgo a substantial reduction
in energy use for the (supposed) convenience of computer programmers is
ridiculous. Remember that computers are not an end unto themselves,
they are tools here to serve.

Ray
--
This signature intentionally left blank.
 
Raymond DeCampo





PostPosted: 2006-1-12 6:05:00 Top

java-programmer >> Handling of DST in java Stefan Ram wrote:
> Raymond DeCampo <email***@***.com> writes:
>
>>Perhaps, but that is not something the government can easily
>>legislate nor enforce. (Do you really want the time police
>>checking to see if you are working an hour later?)
>
>
> Something like this is done here for the closing-time of
> stores. So, since the government already enforces
> opening-times and closing-times of stores, they could change
> these and they could change to times for schools, universities
> and their own agencies. Some other institutions then might
> follow.
>

By "here", I assume you mean Germany, based on what you wrote below.
There are no such laws in the US with the exception of some states that
have "blue laws" that only apply on Sundays.

Your suggestion sounds like a nightmare where you never know what is
going to be available when.

>
>>There is nothing sacred about the time zone.
>
>
> It is only that, given two time stamps of the legal time for
> a location in Germany, like
>
> 2005-07-10T21:38:10 and
> 1960-07-10T21:38:13
>
> it would be a typical programming task to write a routine
> that can calculate the difference between them in seconds.
> And this would be much more easy, without the need to have
> to find out all details of regulations for DST in Germany.
>
> After WWII, in Germany, there were several different zones
> controlled by different countries and some details for the DST
> differed between these zones. In one zone, there was a special
> DST with two hours added for the mid of summer. Then there are
> reports that there were years with DST even in winter. And so
> on.
>
> All these special regulations make it very difficult to
> write such a routine.
>

This is why any environment worth its salt has these routines available
in a standard library. Asking people to forgo a substantial reduction
in energy use for the (supposed) convenience of computer programmers is
ridiculous. Remember that computers are not an end unto themselves,
they are tools here to serve.

Ray
--
This signature intentionally left blank.
 
Roedy Green





PostPosted: 2006-1-12 6:07:00 Top

java-programmer >> Handling of DST in java On Wed, 11 Jan 2006 11:55:17 -0000, "Chris Uppal"
<email***@***.com> wrote, quoted or indirectly
quoted someone who said :

>speed limit would change

I wonder how soon it will be economical to replace all painted speed
limit signs with electronic ones that can be controlled to give
sensible numbers depending on visibility, slipperiness, nearby
accidents and simply to optimally regulate traffic flow to prevent
congestion. You could also have a sign an freeway on ramp to let you
know when an open slot was coming, and to ramp up to speed to meet it,
or to just stay off the freeway for a while since adding more cars
would reduce the aggregate flow.

It blows my mind how people insist on driving the speed limit in the
slickest ice, on the first snow when people are caught without snow
tires, or in pea-soup fog. You sometimes get multiple car pileups as a
result.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
 
Oliver Wong





PostPosted: 2006-1-12 6:38:00 Top

java-programmer >> Handling of DST in java
"Raymond DeCampo" <email***@***.com> wrote in message
news:dSdxf.63626$email***@***.com...
> Stefan Ram wrote:
>> Raymond DeCampo <email***@***.com> writes:
>>
>>>It has been shown that daylight saving time results in less
>>>energy consumption.
>>
>>
>> "less" in relation to what?
>
> I think that it is clear that the statement above compares daylight saving
> time to the lack of daylight saving time.

Why would DST result in energy savings? (Not rhetorical, I really don't
know)

- Oliver


 
 
nag





PostPosted: 2006-1-12 18:08:00 Top

java-programmer >> Handling of DST in java Hi ,
Thanks very much.
This is right that JAVA gregorian calendar has got this bug. When DST occurs
in Iran ( time 23:59:59 -> 01:00:00) the calendar returns wrong time. But it
works when DST occurs in Egypt ( time 23:59:59 -> 01:00:00).
"nag" <email***@***.com> wrote in message
news:dq05t5$en7$email***@***.com...
> Hi,
> Does java handle DST automatically ?
> I'm using java Gregorian calendar to get the time/date. Does this
> automatically give the local time/date iirrespective of DST or special
> handling should be done ?
>


 
 
Raymond DeCampo





PostPosted: 2006-1-12 21:48:00 Top

java-programmer >> Handling of DST in java Oliver Wong wrote:
> "Raymond DeCampo" <email***@***.com> wrote in message
> news:dSdxf.63626$email***@***.com...
>
>>Stefan Ram wrote:
>>
>>>Raymond DeCampo <email***@***.com> writes:
>>>
>>>
>>>>It has been shown that daylight saving time results in less
>>>>energy consumption.
>>>
>>>
>>> "less" in relation to what?
>>
>>I think that it is clear that the statement above compares daylight saving
>>time to the lack of daylight saving time.
>
>
> Why would DST result in energy savings? (Not rhetorical, I really don't
> know)
>

What happens is that people use more lights, etc. at night than in the
morning. So moving an hour of daylight from the morning to the evening
cuts down on energy use. There are more details at

<http://www.energy.ca.gov/daylightsaving.html>

if you are interested.

Ray

--
This signature intentionally left blank.