clk_get

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

ConfigurationValueNotes
CLK_CFG_STR_CONV_ENDEF_ENABLEDRequired to echo the set date and time.
CLK_CFG_UNIX_ENDEF_ENABLEDRequired to echo the date and time in UNIX format.
CLK_CFG_NTP_ENDEF_ENABLEDRequired to echo the date and time in NTP format.

Notes/Warnings

None.

Examples

>clk_get
2014-10-21 14:27:00 UTC+00:00
 
>clk_get -u
1412692020
 
>clk_get --ntp
3622890420