FabGL
ESP32 Display Controller and Graphics Library
fabgl::DateTime Struct Reference

Represents date and time. More...

#include <DS3231.h>

Public Member Functions

time_t timestamp (int timezone)
 Calculates Unix timestamp. More...
 

Public Attributes

int8_t dayOfMonth
 
int8_t dayOfWeek
 
int8_t hours
 
int8_t minutes
 
int8_t month
 
int8_t seconds
 
int16_t year
 

Detailed Description

Represents date and time.

Member Function Documentation

◆ timestamp()

time_t fabgl::DateTime::timestamp ( int  timezone)

Calculates Unix timestamp.

Parameters
timezoneTimezone (hours)
Returns
Unix timestamp

Member Data Documentation

◆ dayOfMonth

int8_t fabgl::DateTime::dayOfMonth

1..31

◆ dayOfWeek

int8_t fabgl::DateTime::dayOfWeek

1..7 (1 = sunday)

◆ hours

int8_t fabgl::DateTime::hours

0..23

◆ minutes

int8_t fabgl::DateTime::minutes

0..59

◆ month

int8_t fabgl::DateTime::month

1..12

◆ seconds

int8_t fabgl::DateTime::seconds

0..59

◆ year

int16_t fabgl::DateTime::year

1900..9999 (2000..2099 for DS3231, and 1900..2038 using timestamp()


The documentation for this struct was generated from the following files: