Search packages, repositories and app categories

Package detailsv1.0.2

posix_tz

Posix timezones package. This package is designed to simplify working with timezones, allowing developers to read and write timezones in posix standard.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
22
Likes
3
Pub points
150

Install package

flutter pub add posix_tz

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The posix_tz package simplifies working with timezones by providing tools to read and write timezone data according to the POSIX standard. It enables developers to handle timezone conversions and manipulations efficiently across multiple platforms, ensuring consistency in date and time operations. Designed for use in Flutter applications, it supports Android, iOS, Web, macOS, Windows, and Linux, making it ideal for cross-platform projects requiring accurate timezone handling.

Use cases

  • Cross-platform timezone management
  • Parsing and applying POSIX timezone formats
  • Timezone-aware date calculations
  • International application localization
  • Server-client timezone synchronization
  • Handling daylight saving transitions

Key features

  • POSIX timezone format support
  • Platform-agnostic implementation
  • Simple API for timezone parsing
  • Supports all major operating systems
  • Accurate daylight saving time handling
  • Lightweight and dependency-free

Suitable for

  • Developers building global apps
  • Applications needing precise timezone logic
  • Projects using POSIX timezone conventions
  • Flutter apps targeting multiple platforms
  • Teams requiring consistent timezone behavior

Considerations

  • Requires valid POSIX timezone strings
  • Limited to POSIX standard only
  • No built-in timezone database updates
  • May need manual timezone file maintenance
  • Not suitable for non-POSIX timezone formats
  • Depends on external timezone data sources for full coverage

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Posix Tz

This library provides timezones in the standard Posix format. The data is obtained by reading the content of /usr/share/zoneinfo.

Initialization

It's important to initialize the library before reading the timezones.

void main() {
    await initializePosixTz();
}

Usage

// after initialization
final posixTz = db.get("Europe/Rome");
print(posixTz.toString()) // name:Europe/Rome, posix:CET-1CEST,M3.5.0,M10.5.0/3

Other

PosixTz can be compared.

final posixTz1 = posixTzDb.get('Europe/Rome');
final posixTz2 = posixTzDb.get('Europe/Rome');
final posixTz3 = posixTzDb.get('Atlantic/Stanley');
print(posixTz1 == posixTz2); // true
print(posixTz1 == posixTz3); // false

posixTzDb can be expanded.

posixTzDb.add(PosixTz(name: "Ababwa",posix: "<+06>-6"));

Categories

Source repository

Projects using this package

No data available yet.