---
name: "time.h"
section: "3avr"
platform: "linux"
package: "avr-libc"
version: "1:2.2.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/time.h"
---

# time.h(3avr)

## NAME

time.h

## SYNOPSIS

### Data Structures

struct **tm**\
 struct **week\_date**\

### Macros

\#define **ONE\_HOUR**   3600\
 \#define **ONE\_DEGREE**   3600\
 \#define **ONE\_DAY**   86400\
 \#define **UNIX\_OFFSET**   946684800\
 \#define **NTP\_OFFSET**   3155673600\

### Typedefs

typedef **uint32\_t** **time\_t**\

### Enumerations

enum **\_WEEK\_DAYS\_** { **SUNDAY**, **MONDAY**, **TUESDAY**, **WEDNESDAY**, **THURSDAY**, **FRIDAY**, **SATURDAY** }\
 enum **\_MONTHS\_** { **JANUARY**, **FEBRUARY**, **MARCH**, **APRIL**, **MAY**, **JUNE**, **JULY**, **AUGUST**, **SEPTEMBER**, **OCTOBER**, **NOVEMBER**, **DECEMBER** }\

### Functions

**time\_t** **time** (**time\_t** \*timer)\
 **int32\_t** **difftime** (**time\_t** time1, **time\_t** time0)\
 **time\_t** **mktime** (struct **tm** \*timeptr)\
 **time\_t** **mk\_gmtime** (const struct **tm** \*timeptr)\
 struct **tm** \* **gmtime** (const **time\_t** \*timer)\
 void **gmtime\_r** (const **time\_t** \*timer, struct **tm** \*timeptr)\
 struct **tm** \* **localtime** (const **time\_t** \*timer)\
 void **localtime\_r** (const **time\_t** \*timer, struct **tm** \*timeptr)\
 char \* **asctime** (const struct **tm** \*timeptr)\
 void **asctime\_r** (const struct **tm** \*timeptr, char \*buf)\
 char \* **ctime** (const **time\_t** \*timer)\
 void **ctime\_r** (const **time\_t** \*timer, char \*buf)\
 char \* **isotime** (const struct **tm** \*tmptr)\
 void **isotime\_r** (const struct **tm** \*, char \*)\
 size\_t **strftime** (char \*s, size\_t maxsize, const char \*format, const struct **tm** \*timeptr)\
 void **set\_dst** (int(\*)(const **time\_t** \*, **int32\_t** \*))\
 void **set\_zone** (**int32\_t**)\
 void **set\_system\_time** (**time\_t** timestamp)\
 void **system\_tick** (void)\
 **uint8\_t** **is\_leap\_year** (**int16\_t** year)\
 **uint8\_t** **month\_length** (**int16\_t** year, **uint8\_t** month)\
 **uint8\_t** **week\_of\_year** (const struct **tm** \*timeptr, **uint8\_t** start)\
 **uint8\_t** **week\_of\_month** (const struct **tm** \*timeptr, **uint8\_t** start)\
 struct **week\_date** \* **iso\_week\_date** (int year, int yday)\
 void **iso\_week\_date\_r** (int year, int yday, struct **week\_date** \*)\
 **uint32\_t** **fatfs\_time** (const struct **tm** \*timeptr)\
 void **set\_position** (**int32\_t** latitude, **int32\_t** longitude)\
 **int16\_t** **equation\_of\_time** (const **time\_t** \*timer)\
 **int32\_t** **daylight\_seconds** (const **time\_t** \*timer)\
 **time\_t** **solar\_noon** (const **time\_t** \*timer)\
 **time\_t** **sun\_rise** (const **time\_t** \*timer)\
 **time\_t** **sun\_set** (const **time\_t** \*timer)\
 float **solar\_declinationf** (const **time\_t** \*timer)\
 double **solar\_declination** (const **time\_t** \*timer)\
 long double **solar\_declinationl** (const **time\_t** \*timer)\
 **int8\_t** **moon\_phase** (const **time\_t** \*timer)\
 unsigned long **gm\_sidereal** (const **time\_t** \*timer)\
 unsigned long **lm\_sidereal** (const **time\_t** \*timer)\

## Author

Generated automatically by Doxygen for AVR-LibC from the source code.
