eu_dst(3avr)

πŸ“¦
version 2.2.1 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– eu_dst β€” bestie edition πŸ’–

okay so this one lives in the <util/eu_dst.h> header and it's the Daylight Saving function for the European Union. that's the whole vibe. EU girlies, this one's for you 🫢


✨ SYNOPSIS ✨

functions, aka the goods

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

🌸 DETAILED DESCRIPTION 🌸

first things first, get the header in there:

#include <util/eu_dst.h>

and that's it, that's the include. this is Daylight Saving Time for the European Union, no cap, just the one job πŸ’…


πŸ‘‘ FUNCTION DOCUMENTATION πŸ‘‘

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

to actually use this thing, you call:

set_dst(eu_dst);

that's it. that's the whole setup. iconic honestly πŸŽ€

so here's the deal bestie: given the time stamp and time zone parameters you hand it, the Daylight Saving function must return a value that's appropriate for the tm structures' tm_isdst element. which means:

  • 0 β€” if Daylight Saving is not in effect. we're in standard time era, no extra hour for us 😭
  • -1 β€” if it literally cannot be determined whether Daylight Saving is in effect. the function is going 🀷 and honestly? same.
  • a positive integer β€” this represents the number of seconds a clock is advanced for Daylight Saving. typically this is gonna be ONE_HOUR ⭐
⚠️ real talk time: Daylight Saving 'rules' are subject to frequent change. like, constantly. governments just wake up and decide. so for production applications, it is recommended to write your own DST function β€” one that uses 'rules' obtained from, and modifiable by, the end user (maybe stored in EEPROM, if you're feeling spicy πŸ”₯).

πŸ¦‹ AUTHOR πŸ¦‹

Generated automatically by Doxygen for AVR-LibC from the source code. not a human, just a robot doing its little thing πŸ€–βœ¨


and that's the tea β˜• this whole page is from AVR-LibC, Version 2.2.1, and yeah bestie, eu_dst(3avr) is the manual page you're standing in. go forth and save that daylight πŸ’–πŸŒΈπŸ§šπŸ’œ

πŸ“¦ where this page comes from