Menu

#2245 interpretation of negative times

None
closed-fixed
nobody
2020-07-16
2020-04-03
theozh
No

I have some issue with negative times in gnuplot.

Basically, I would like to write a negative time, e.g. as -00:01:00, but gnuplot is not interpreting it as -60 seconds, but as +60 seconds. I can somehow understand why: because -00 hours is equal to +00 hours and then01 minutes are counted positive.

myTimeFmt = "%tH:%tM:%tS"
print strptime(myTimeFmt,"-00:01:00")
print strptime(myTimeFmt,"+00:01:00")

will both result in +60 seconds, which is not what I would expect.

More details and an attempt of a workaround, see https://stackoverflow.com/q/60995400/7295599

Discussion

  • Ethan Merritt

    Ethan Merritt - 2020-04-04
    • status: open --> pending-fixed
    • Group: -->
    • Priority: -->
     
  • Ethan Merritt

    Ethan Merritt - 2020-04-04

    Yes, a bug. Fixed now.

     
  • Ethan Merritt

    Ethan Merritt - 2020-07-16
    • Labels: strptime, timefmt --> v5.4, timefmt, strptime
    • Status: pending-fixed --> closed-fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.