Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for milliseconds in timefmt missing #23

Open
MatthiasScholz opened this issue Sep 9, 2015 · 6 comments
Open

Support for milliseconds in timefmt missing #23

MatthiasScholz opened this issue Sep 9, 2015 · 6 comments

Comments

@MatthiasScholz
Copy link

The following time format is not usable with feedgnuplot, but it is fully compatible with gnuplot:
--timefmt '%H:%M:%3.S' for time like this: 16:02:54.672

The perl script terminates because Time::Piece does not support millisecond in the time formats:
http://stackoverflow.com/questions/4012068/how-do-i-parse-microseconds-with-timepiece-strptime

@dkogan
Copy link
Owner

dkogan commented Sep 9, 2015

Yes, this is a know issue unfortunately. Do you know of a perl strptime() implementation that can do sub-second precision?

@MatthiasScholz
Copy link
Author

No, unfortunately I am not at all a perl programmer. But at the link it is mentioned to use DateTime::....::strptime. Would it not be easy to adapt to this why of the format description?

@dkogan
Copy link
Owner

dkogan commented Sep 9, 2015

OK, so your time format is not supported by gnuplot or anything else. If you get rid of the "3." then gnuplot can ingest it, but Time::Piece and DateTime::Format::Strptime doesn't take the floating-point value. I have some other ideas, but won't get to them today.

@MatthiasScholz
Copy link
Author

Gnuplot itself has no problem with working with this time format.

For the given time: 16:02:54.672 one just needs to configure: 
set timefmt '%H:%M:%S'
set format x '%H:%M:%.3S'

http://stackoverflow.com/a/18825927

@lalten
Copy link

lalten commented Aug 3, 2018

I'm having this problem. My input comes from moreutils ts with the format %.s (sub-second resolution epoch, looks like 1533312748.419280)

Do you know a solution?

@dkogan
Copy link
Owner

dkogan commented Aug 3, 2018

This is non-standard, and all components would need to be able to work with such nonstandard data. The sticking point currently is Time::Piece and DateTime::Format::Strptime. You can send them patches. I don't have time to work on this right now, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants