Daylight saving Time issue... 
Author Message
 Daylight saving Time issue...

Can anybody help me to find an easy daylight saving time solution?
Please, no windows solution, my prg needs to be the only one on
the machine, so it must support daylight saving time...

Regards........



Sun, 27 Oct 2002 03:00:00 GMT  
 Daylight saving Time issue...
You can code this in clipper - just may take more work than you expect.
Maybe start by going to Yahoo ( or your favorite search engine ) and
doing a search for "daylight savings time".

Example, from Yahoo:

Under legislation enacted in 1986, daylight saving time in the USA

begins at 2 a.m. on the first Sunday of April and
ends at 2 a.m. on the last Sunday of October

In most of the countries of western Europe, including the countries
that are members of the EEC, daylight saving time:

begins at 1 a.m. GMT on the last Sunday of March and
ends at 1 a.m. GMT on the last Sunday of October

Daylight Saving Time - for the U.S. and its territories - is not
observed in Hawaii, American Samoa, Guam, Puerto Rico, the {*filter*}
Islands, the Eastern Time Zone portion of the State of Indiana,
and by most of Arizona (with the exception of the Navajo Indian
Reservation in Arizona).

In many other countries around the world, daylight saving time lasts
from March 30th to October 26th.

So we can see where the MS-Windows region settings play an important
part in recognizing whether or not one of these time boundries has been
passed.

Depending on what your application does, how often you must test for
time change, etc it may be best to pre-calculate on program startup
when the next occurances of Daylight-On and Daylight-Off will be.  In
2000, in the eastern US:
    Daylight-On    2 a.m. the first Sunday of April   04/20/2000
    Daylight-Off   2 a.m. the last Sunday of October  10/29/2000
And you will need to decide whether to use the Time string or Seconds.

Hope this helps.

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 27 Oct 2002 03:00:00 GMT  
 Daylight saving Time issue...

Quote:

>Can anybody help me to find an easy daylight saving time solution?
>Please, no windows solution, my prg needs to be the only one on
>the machine, so it must support daylight saving time...

DST doesn't start and end at midnight, so you'll need to switch to
julian time to do it easily. You'll need the julian.zip file from my
www site to use this.

// Determine the starting date of daylight savings time this year

STARTDATE := ctod( '04/01/' + right( dtoc( TODAY ), 2 ) )
ENDDATE   := STARTDATE + 7

for x := STARTDATE to ENDDATE
   if dow( x ) == 1
      exit
   endif
next

JDLSTS := TD2JUL( '02:00', x )// exact time OF TRANSITION IS 02:00 AM

// Determine the ending date of daylight savings time this year

STARTDATE := ctod( '10/31/' + right( dtoc( TODAY ), 2 ) )
ENDDATE   := STARTDATE - 7

for x := STARTDATE to ENDDATE step - 1
   if dow( x ) == 1
      exit
   endif
next

JDLSTE := TD2JUL( '02:00', x )// exact time OF TRANSITION IS 02:00 AM

--

        Oasis WWW  http://www.the-oasis.net
         FTP Site  ftp://ftp.iag.net/pub/clipper
      Clipper FAQ  http://www.the-oasis.net/clipper.html
  Harbour Project  http://www.Harbour-Project.org

      Reality is the leading cause of stress
       among those who are in touch with it.



Sun, 27 Oct 2002 03:00:00 GMT  
 Daylight saving Time issue...
Daemon

Put the dates etc.. into a DBF and when the day rolls around have your
program change the clock of the machine.
or
Use a machine where DS is supported in the BIOS <g>
or
Check out the Linux source to see how it's done and write your own TimeZone
routines
or
Use windows

--
HTH
Steve Quinn
A SKEPTIC is one who won't take "know" for an answer.


Quote:
> Can anybody help me to find an easy daylight saving time solution?
> Please, no windows solution, my prg needs to be the only one on
> the machine, so it must support daylight saving time...

> Regards........



Tue, 29 Oct 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. time.daylight (Daylight Saving Time)

2. time zones, daylight saving time, and universal time

3. VisualWork, Time, and Daylight Savings TIme

4. Daylight Savings Time

5. Daylight saving time

6. gmt vs. labview daylight saving time XL

7. DayLight Saving Time in LabView

8. Daylight Saving Time flag in BIOS

9. gnat304 Daylight Saving Time problem (was: compiler errors in GNAT 304a (win95))

10. time, strptime, daylight saving

11. Disregard daylight saving time

12. Daylight Savings Time goof

 

 
Powered by phpBB® Forum Software