v1.0.2
posix_tz
Posix 时区包。此包旨在简化时区操作,使开发者能够以 Posix 标准读取和写入时区。
3喜欢 22近 30 天下载150Pub 分数
AndroidiOSWebmacOSWindowsLinux
Posix 时区 Dart 包。此库提供标准 Posix 格式的时区。数据通过读取 /usr/share/zoneinfo 的内容获得。
以下为英文项目原文快照,最新内容请访问 GitHub。
This library provides timezones in the standard Posix format. The data is obtained by reading the content of /usr/share/zoneinfo.
It's important to initialize the library before reading the timezones.
void main() {
await initializePosixTz();
}
// after initialization
final posixTz = db.get("Europe/Rome");
print(posixTz.toString()) // name:Europe/Rome, posix:CET-1CEST,M3.5.0,M10.5.0/3
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"));
依赖清单 2 项
^1.25.2^5.1.0先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗