You are using staging server - a separate instance of the ESP Component Registry that allows you to try distribution tools and processes without affecting the real registry.

qb4-dev/tzdata

1.0.0

Latest
uploaded 2 weeks ago
Timezone data component for ESP-IDF

readme

# esp-tzdata

Timezone data component for ESP-IDF.

## Overview

`esp-tzdata` provides a small, embedded timezone database (tzdata) and a
convenience API to set the system timezone at runtime using names such as
`Europe/Warsaw` or `America/New_York`.

## Installation

### Using ESP Component Registry

```bash
idf.py add-dependency "QB4-dev/tzdata^1.0.0"
```

### Manual Installation

Clone this repository into your project's `components` directory:

```bash
cd your_project/components
git clone https://github.com/QB4-dev/esp-tzdata.git tzdata
```

## Usage

Include the header and call the API to set the timezone by name:

```c
#include "timezone.h"

// ...
if (tzdata_set_timezone("Europe/Warsaw") == ESP_OK) {
		// timezone applied
}
```

The timezone names available are defined in `tz_data.txt`. Each entry maps a
human-readable timezone name to a POSIX TZ string.

## Updating tzdata

- `tz_data.txt` contains the list of timezone name / POSIX TZ pairs used to
	generate the `tz_data` table at compile time. Update that file to add or
	remove entries and rebuild the project.

Links

Supports all targets

Maintainer

  • Jakub Turek <qb4.dev@gmail.com>

License: GPL-2.0

To add this component to your project, run:

idf.py add-dependency "qb4-dev/tzdata^1.0.0"

download archive

Stats

  • Archive size
    Archive size ~ 15.41 KB
  • Downloaded in total
    Downloaded in total 0 times
  • Downloaded this version
    This version: 0 times

Badge

qb4-dev/tzdata version: 1.0.0
|