dtime
A professional, cross-platform datetime display utility with colored output and millisecond precision.
Features
- 🕒 Display local and UTC time with millisecond precision
- 📅 Unix timestamps in seconds and milliseconds
- 🌍 Timezone information with UTC offset
- 🎨 Beautiful colored output using true color (24-bit)
- 📊 Multiple output formats: colored, plain text, JSON
- 🔄 Monitor mode for real-time updates
- 🖥️ Cross-platform: Windows, Linux, macOS
- 🚀 Fast and lightweight
Installation
From Crates.io
From Source
Usage
Basic Usage
# Display current datetime (colored output by default)
# Plain text output
# JSON output
# Disable colors
Advanced Options
# Show ISO 8601 format
# Monitor mode (updates every 2 seconds)
# Custom timezone
# Combine options
Output Examples
Colored Output (Default)
╔══════════════════════════════════════════════════╗
║ SYSTEM TIME INFORMATION ║
╚══════════════════════════════════════════════════╝
┌──────────────────────────────────────────────────┐
│ Local Time: 2024-01-15 14:30:45.123 WIB │
│ UTC Time: 2024-01-15 07:30:45.123 UTC │
│ Unix Sec: 1705321845 │
│ Unix MS: 1705321845123 │
└──────────────────────────────────────────────────┘
╔══════════════════════════════════════════════════╗
║ TIMEZONE INFORMATION ║
╚══════════════════════════════════════════════════╝
┌──────────────────────────────────────────────────┐
│ Timezone: WIB │
│ Offset: +07:00 │
│ Weekday: Monday │
└──────────────────────────────────────────────────┘
JSON Output
Using as a Library
Add to your Cargo.toml:
[]
= "0.1"
use ;
License
Licensed under either of:
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option.
👤 Author
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
