das-developers / das2java

The original das2 library. Provides interactive publication-ready 2-D plotting
https://das2.org
GNU Lesser General Public License v3.0
4 stars 0 forks source link

das2stream misformat around time with zero milliseconds #16

Open jbfaden opened 3 years ago

jbfaden commented 3 years ago

Sadie showed where a das2stream could be produced containing times like "2017-11-27T12:20:12.-00". This is when the milliseconds are nearly 0. To demo the bug:

jbfaden commented 3 years ago

The solution here is to check for -1 where the rounding takes it down a microsecond, and call it zero. The code still has awkward floating-point seconds and integer sub-seconds, and this needs a more thorough review. But the immediate problem is resolved.