daylight saving time

daylight saving time

Post by Victor Noode » Mon, 02 Apr 2001 16:13:37



Hi, I'm using a public domain C compiler and I'm wondering about the
following:

Do I have to code anything for daylight saving ( like adding 3600 to a
time_t value)
Or should the call to this routine:

char *getSystemDate()
{
  time_t    time_value;

  time_value = time( NULL );
  return( ctime( &time_value ) );

Quote:}

return the day/time equalto the time in the windows system tray?

(if so, i got a bug... )

thanks
Victor

 
 
 

daylight saving time

Post by Barry Margoli » Mon, 02 Apr 2001 17:18:42



Quote:>Hi, I'm using a public domain C compiler and I'm wondering about the
>following:

>Do I have to code anything for daylight saving ( like adding 3600 to a
>time_t value)
>Or should the call to this routine:

>char *getSystemDate()
>{
>  time_t    time_value;

>  time_value = time( NULL );
>  return( ctime( &time_value ) );
>}

>return the day/time equalto the time in the windows system tray?

If your TZ environment variable is set properly, ctime() should handle DST
for you automatically.

--

Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

1. Daylight Saving Time

Does anyone have a shell script which can be used to determine the date on
which the shift between standard time and daylight time will occur? What I
want to be able to do is run the script and have it return a default
machine-readable date (i.e. YYYYMMDD) of the date that the shift will occur
with an optional switch which will return the number of days until the next
shift occurs. Thus, if it is run on the Sunday that occurs just one week
prior to the shift the return value will be 7. If it is run on the day that
the shift occurs it would return approximately 180 days.

2. Interesting Netscape problem

3. Problems with daylight saving time

4. Security on a DEC

5. Help with Daylight saving time...

6. Ann: 'javadoc' like Documentation Generator For C++

7. Changing to Daylight Saving TIme

8. bootnet.img

9. Daylight saving time methods?

10. ctime() problem with daylight saving time?

11. New daylight saving time code for SunOS 4.x?

12. Daylight Saving Time

13. How to test daylight saving time?