real_ist_time 1.0.0
real_ist_time: ^1.0.0 copied to clipboard
Get accurate Indian Standard Time (IST) from multiple NTP servers and HTTP APIs with smart caching and automatic fallback. Independent of device clock settings.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2025-11-30 #
Added #
- Multiple NTP Servers: Support for 5 NTP servers (Google, Cloudflare, NTP Pool, Windows, NIST)
- Multiple HTTP APIs: Support for 3 HTTP time APIs (timeapi.io, worldtimeapi.org, worldclockapi.com)
- Smart Caching: In-memory cache with configurable duration to reduce network requests
- Configuration System: Comprehensive
IstTimeConfigclass for customizing behavior - Source Tracking:
TimeSourceResultmodel to track which source provided the time - Enhanced Error Handling: Detailed error reporting with
TimeSourceErrorandAllTimeSourcesFailedException - Multiple Format Options: Support for 24-hour, 12-hour, and full date-time formats
- Synchronous Cache Access:
getIstTimeSync()for instant cached results - Cache Management: Methods to check cache status and clear cache
- Source Testing:
testAllSources()to test all available time sources - Comprehensive Documentation: Detailed API documentation and examples
- Type Safety: Full Dart type safety throughout the package
Changed #
- Breaking: Reorganized internal structure into modular architecture
- Enhanced:
getIstTime()now uses configuration and caching - Enhanced:
getFormattedIstTime()now supports multiple formats - Improved: Better error messages and exception handling
- Improved: More reliable fallback mechanism
Fixed #
- Timeout issues with slow NTP servers
- Better handling of network failures
- More accurate IST conversion