/usr/bin/sdk-date
Main executable file
Kylin sdk date and time format management service
kysdk-date
kysdk-date is a date and time format management service in the KYLIN SDK system. This service provides real-time date and time formatting capabilities, monitoring user configuration changes and broadcasting formatted date/time information through D-Bus signals.
The service runs as a background daemon that monitors changes to date format configuration files and automatically broadcasts updated date/time information to all subscribed applications. It supports multiple date formats and time display modes (12-hour/24-hour clock).
Monitors user date format configuration file changes in real-time using inotify
Supports various date formats including: - Short date formats (yy-M-d, MM/dd/yyyy, etc.) - Long date formats (yyyy MM dd, yy M d, etc.) - Custom formats with different separators (-, /, .)
Supports both 12-hour and 24-hour clock formats
Broadcasts date/time information through D-Bus signals when configurations change
Provides localized date format strings based on system locale settings
The service implements the following D-Bus interface `com.kylin.kysdk.DateInterface` with these signals:
DateSignalEmitted when the date format configuration changes, providing: - Formatted date string - Time format information
LongDateSignalEmitted for long date format changes, providing: - Long date format template - Formatted long date string
ShortDateSignalEmitted for short date format changes, providing: - Short date format template - Formatted short date string
TimeSignalEmitted for time format changes, providing: - Time format information (12-hour/24-hour clock)
The service monitors the configuration file located at: ~/.config/kydate/dateformat.conf
Configuration options include:
|
General date format setting |
|---|---|
|
Time format setting (12 or 24) |
|
Specific format for long date display |
|
Specific format for short date display |
/usr/bin/sdk-date
Main executable file
~/.config/kydate/dateformat.conf
User configuration file for date/time formats
/var/log/kysdk-date.log
Log file (if logging is enabled)
The service runs as a session D-Bus service with: - Service name: com.kylin.kysdk.DateServer - Object path: /com/kylin/kysdk/Date - Interface: com.kylin.kysdk.DateInterface
|
For inter-process communication |
|---|---|
|
For main loop integration |
GNU gettext
|
For localization support |
The service uses a multi-threaded architecture: - Main thread: Handles D-Bus communication and main loop - Monitor thread: Watches for configuration file changes - Signal threads: Handle date/time formatting and broadcasting
IN_CREATE, IN_DELETE, IN_MODIFY, IN_MOVE_SELF
|
inotify events monitored for configuration file changes |
|---|---|
SIGTERM, SIGINT
|
Graceful shutdown signals |
Supports localization through GNU gettext with: - Language-specific date formats - Translated time format descriptions - Locale-aware date formatting