Setheck/dat

shouldn't the `-t` option return the parsed timestamp as epoch?

Closed this issue · 2 comments

Thanks for publishing this plugin. It is a very useful utility.
I have a question about the intention of the parse input feature.

dat 2023-11-30T10:32:12Z -tf -f only prints an error message with the detected format. I expected the parsed timestamp to be printed as an epoch. Shouldn't that be the correct behavior or is it's sole purpose to print the format of the provided time string?

Glad you find it helpful!
You are correct in discovering a bug where the detected format is not applied to the output.
However, your use of flags is incorrect. Your example seems to combine the short flags -t and -f and then you are passing in the format -f
If you refer to the help, the detection flag is either -t of --tf which understandably is a little confusing.
But I will create patch to fix the behavior.

Go ahead and try out the latest release!
Would love any feedback.
Thanks!