AVR-LibC  2.2.0
Standard C library for AVR-GCC
 

AVR-LibC Documentation

Logo

AVR-LibC Development Pages

Main Page

User Manual

Library Reference

FAQ

Example Projects

File List

Loading...
Searching...
No Matches
Functions
<util/eu_dst.h>: Daylight Saving function for the European Union.

Functions

int eu_dst (const time_t *timer, int32_t *z)
 

Detailed Description

#include <util/eu_dst.h>

Dayligh Saving Time for the European Union

Function Documentation

◆ eu_dst()

int eu_dst ( const time_t timer,
int32_t z 
)

To utilize this function, call

void set_dst(int(*)(const time_t *, int32_t *))
Definition: set_dst.c:44
int eu_dst(const time_t *timer, int32_t *z)
Definition: eu_dst.c:37

Given the time stamp and time zone parameters provided, the Daylight Saving function must return a value appropriate for the tm structures' tm_isdst element. That is:

  • 0 : If Daylight Saving is not in effect.
  • -1 : If it cannot be determined if Daylight Saving is in effect.
  • A positive integer: Represents the number of seconds a clock is advanced for Daylight Saving. This will typically be ONE_HOUR.

Daylight Saving 'rules' are subject to frequent change. For production applications it is recommended to write your own DST function, which uses 'rules' obtained from, and modifiable by, the end user (perhaps stored in EEPROM).