Menu

#2416 Timeformat with millisecond

None
closed-cannot-reproduce
nobody
timefmt (4)
2021-06-03
2021-03-26
Anonymous
No

timeftm can not handle millisecond. This makes it hard to plot things that happens on millisecond basis.

My data looks like
2021-03-25 09:00:01.120,3.3
2021-03-25 09:00:01.121,3.1
2021-03-25 09:00:01.122 3.0
2021-03-25 09:00:01.123,3.1
2021-03-25 09:00:01.124,3.3
2021-03-25 09:00:01.125,3.4

I understand that times could be converted to som arbitrary number for time-series but this is
extra step an I loose information.

gnuplot

G N U P L O T
Version 5.2 patchlevel 8    last modified 2019-12-01

Copyright (C) 1986-1993, 1998, 2004, 2007-2019
Thomas Williams, Colin Kelley and many others

gnuplot home:     http://www.gnuplot.info
faq, bugs, etc:   type "help FAQ"
immediate help:   type "help"  (plot window: hit 'h')

Discussion

  • Ethan Merritt

    Ethan Merritt - 2021-03-26

    From the documentation (end of a long section about time/date formats):

     Gnuplot tracks time to millisecond precision. Time formats have been
     modified to match this.
     Example: print the current time to msec precision
          print strftime("%H:%M:%.3S %d-%b-%Y",time(0.0))
          18:15:04.253 16-Apr-2011
    

    and from the section on time_specifiers:

     Numerical formats may be preceded by a "0" ("zero") to pad the field with
     leading zeroes, and preceded by a positive digit to define the minimum field
     width.  The %S, and %t formats also accept a precision specifier so that
     fractional hours/minutes/seconds can be written.
    

    So if you indeed have a case where fractional seconds are being lost, that might be a bug. Please show the commands that are failing.

     
    • Karl Ratzsch

      Karl Ratzsch - 2021-04-08

      There was a post on the newsgroup a month ago, where it failed with the %p AM/PM specifier.

       
  • Ethan Merritt

    Ethan Merritt - 2021-06-03
    • status: open --> closed-cannot-reproduce
    • Group: -->
    • Priority: -->
     

Log in to post a comment.

MongoDB Logo MongoDB