Hello, guys.
A while ago, Ethan asked what the secret function timecolumn() was
about. Then, more recently, a bug reporter ended up needing it as the
way to work around a limitation, but it didn't work... I just patched
it and added documentation, but some open issues remain.
timecolumn() is sitting between a rock and a hard place because of the
way I implemented multiple separate timefmt specifications a long time
ago (part of the 'axis patch'), yet another feature that was never
actually documented. Each axis can have its own timefmt string.
But parsing of time/date input doesn't really have anything to with axes
--- it deals with datafile columns. Taking into account extended using
specs, the relation between column numbers and axes is many-to-many, so
the two really have no particular link to each other.
The obviously correct solution would be to pass a timeformat string
directly as a second argument to timecolumn(). Back when I added
per-axis timefmt strings, that wasn't possible. Nowadays, with the
stringvariables patch integrated, it probably is.
So: anybody interested in implementing support for
plot 'file' using (timecolumn(1,'%Y-%m-%d %H:%M:%S')):5
or
tf1='%Y-%m-%d %H:%M:%S'
plot 'file' using (timecolumn(1,tf1)):5
|