Echo the current date and time.
Usages
clk_get {[FORMAT]}
Arguments
{[FORMAT]} is an optional argument :
- -d, --datetime for DATETIME format.
- -u, --unix for UNIX format.
- -n, --ntp for NTP format.
if FORMAT is not provided, DATETIME format is used.
Output
Echo the date and time in [FORMAT] format.
Required Configuration
Configuration | Value | Notes |
---|---|---|
CLK_CFG_STR_CONV_EN | DEF_ENABLED | Required to echo the set date and time. |
CLK_CFG_UNIX_EN | DEF_ENABLED | Required to echo the date and time in UNIX format. |
CLK_CFG_NTP_EN | DEF_ENABLED | Required to echo the date and time in NTP format. |
Notes/Warnings
Clk module epoch start on Jan 1st, 2000 at 00:00 UTC.
Only UTC timezone is supported.
Examples
>clk_get 2014-10-21 14:27:00 UTC+00:00 >clk_get -u 1412692020 >clk_get --ntp 3622890420