Describe the bug
The value returned from os.uptime results in a failure parsing it in the UI.
It seems somehow to be no valid format:
cnquery run -c "os.uptime" --config invalid -j; echo ""; uptime; cnquery run -c "os.uptime" --config invalid
→ no provider specified, defaulting to local.
Use --help for a list of available providers.
! could not load configuration file invalid
→ discover related assets for 1 asset(s)
→ resolved assets resolved-assets=1
[{"os.uptime":"0000-01-03T01:13:28+00:53"}]
# linux uptime:
12:11:18 up 2 days, 20 min, 1 user, load average: 0,73, 1,34, 1,87
# w/o json
→ no provider specified, defaulting to local.
Use --help for a list of available providers.
! could not load configuration file invalid
→ discover related assets for 1 asset(s)
→ resolved assets resolved-assets=1
os.uptime: 2 days 20 minutes
I do not see how "2 days 20 minutes" translates to "0000-01-03T01:13:28" and also the timezone looks wrong to me: "+00:53"
To Reproduce
Steps to reproduce the behavior:
Run above commands on a Linux system
Note the error
Expected behavior
I would expect a valid timezone and an obvious value.
Additional context
Not sure how this looks like on Mac or Windows.
We need to implement a special handling for duration. Right now the raw date is exported which is wrong. MQL uses special internal handling to calculate date and duration with the same type.
Describe the bug The value returned from
os.uptime
results in a failure parsing it in the UI.It seems somehow to be no valid format:
I do not see how "2 days 20 minutes" translates to "0000-01-03T01:13:28" and also the timezone looks wrong to me: "+00:53"
To Reproduce Steps to reproduce the behavior:
Expected behavior I would expect a valid timezone and an obvious value.
Additional context Not sure how this looks like on Mac or Windows.