Second attempt...
We need to check if the timepicker variable is an Epoch number or a Splunk artifact like “-7d@d” or “now”.
If the variable is an Epoch number, we convert it to a date using strftime.
If the variable is a String, we need to convert it into an Epoch number using relative_time, then into a date.
<earliest>$command_token.earliest$</earliest>
<latest>$command_token.latest$</latest>
<progress>
<eval token="allCommandsEarliestLabel">
if(isnum($command_token.earliest$),strftime($command_token.earliest$,"%d/%m/%Y %H:%M:%S"),strftime(relative_time(now(), $command_token.earliest$),"%m/%d/%Y %H:%M:%S"))
</eval>
<eval token="allCommandsLatestLabel">
if(isnum($command_token.latest$),strftime($command_token.latest$,"%m/%d/%Y %H:%M:%S"),strftime(relative_time(now(), "@sec"),"%m/%d/%Y %H:%M:%S"))
</eval>
</progress>
... View more