change winter & summer time 
Author Message
 change winter & summer time

Hello!

I want to set the computer system time:
1. last sunday of october: 03h->02h
2. last sunday of marc: 02h->03h
(Is this correct?)

(not every day turn on the computer, and perhaps computer is on when need
to change system time...)
Win98 do it, but i need in pure dos+clipper, because many user make a
phonecall to me how can he/she set... :) (type time.. ;)

How can I compute it in clipper?
Have anyone this routine. I try to make it later if you haven't.

Ultravox



Fri, 26 Apr 2002 03:00:00 GMT  
 change winter & summer time

Quote:

>Hello!

>I want to set the computer system time:
>1. last sunday of october: 03h->02h
>2. last sunday of marc: 02h->03h
>(Is this correct?)

>(not every day turn on the computer, and perhaps computer is on when need
>to change system time...)
>Win98 do it, but i need in pure dos+clipper, because many user make a
>phonecall to me how can he/she set... :) (type time.. ;)

>How can I compute it in clipper?
>Have anyone this routine. I try to make it later if you haven't.

// 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

Begin := x

// 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

End := x

--

        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

     Do all the good you can, In all the ways you can,
     In all the places you can, At all times you can,
     To all the people you can, As long as you ever can.



Fri, 26 Apr 2002 03:00:00 GMT  
 change winter & summer time

Quote:

>Hello!

>I want to set the computer system time:
>1. last sunday of october: 03h->02h
>2. last sunday of marc: 02h->03h
>(Is this correct?)

>(not every day turn on the computer, and perhaps computer is on when need
>to change system time...)
>Win98 do it, but i need in pure dos+clipper, because many user make a
>phonecall to me how can he/she set... :) (type time.. ;)

>How can I compute it in clipper?
>Have anyone this routine. I try to make it later if you haven't.

>Ultravox

Damn, I posted non-y2k compliant and US centric code. Gotta get a cup
of coffee...

Excuse me, that should have been.....

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

STARTDATE := ctod( '04/01/' + left( dtos( TODAY ), 4 ) )
ENDDATE   := STARTDATE + 7

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

Begin := x

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

STARTDATE := ctod( '10/31/' + left( dtos( TODAY ), 4 ) )
ENDDATE   := STARTDATE - 7

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

End := x

--

        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

     Do all the good you can, In all the ways you can,
     In all the places you can, At all times you can,
     To all the people you can, As long as you ever can.



Fri, 26 Apr 2002 03:00:00 GMT  
 change winter & summer time

Quote:

> Damn, I posted non-y2k compliant and US centric code. Gotta get a cup of
> coffee...

> [SNIP]
> STARTDATE := ctod( '04/01/' + left( dtos( TODAY ), 4 ) )
> [SNIP]
> STARTDATE := ctod( '10/31/' + left( dtos( TODAY ), 4 ) )
> [SNIP]

The above is still date format sensitive.

--
Take a look in Hagbard's World: |   w3ng - The WWW Norton Guide reader.
http://www.acemake.com/hagbard/ |     eg - Norton Guide reader for Linux.
http://www.hagbard.demon.co.uk/ |    weg - Norton Guide reader for Windows.
Free software, including........| dgscan - DGROUP scanner for Clipper.



Fri, 26 Apr 2002 03:00:00 GMT  
 change winter & summer time

Quote:


>> Damn, I posted non-y2k compliant and US centric code. Gotta get a cup of
>> coffee...

>> [SNIP]
>> STARTDATE := ctod( '04/01/' + left( dtos( TODAY ), 4 ) )
>> [SNIP]
>> STARTDATE := ctod( '10/31/' + left( dtos( TODAY ), 4 ) )
>> [SNIP]

>The above is still date format sensitive.

Grumble...

Like I said about the coffee...

STARTDATE := stod( left( dtos( TODAY ), 4 ) + '0401' )

STARTDATE := stod( left( dtos( TODAY ), 4 ) + '1031' )

And, if you don't have an stod() function, write me back and I'll post
one.

--

        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

     Do all the good you can, In all the ways you can,
     In all the places you can, At all times you can,
     To all the people you can, As long as you ever can.



Fri, 26 Apr 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. timestamp and summer/winter time change

2. winter and summer time confusion in clock and tcl 8.4.12 and 8.5a4 (starpack)

3. clock scan and summer/winter time

4. Spindate bug in winter time change

5. Clipper SUMMER vs. Clipper WINTER

6. Record Change Time & Date Embed

7. Changing a file's date & time

8. Changing date & time from REXX

9. clock and summer-time

10. US-CA-Sunnyvale Tcl/Tk summer / part-time

11. Run-time & Design-time window size problem

12. TIME&DATE in HTML shows TIME

 

 
Powered by phpBB® Forum Software