in azure-kusto-data/src/types.rs [117:139]
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
let neg = if self.is_negative() {
write!(f, "-")?;
-1
} else {
1
};
if self.whole_days().abs() > 0 {
write!(f, "{}.", self.whole_days().abs())?;
}
write!(
f,
"{:02}:{:02}:{:02}.{:07}",
neg * (self.whole_hours() - self.whole_days() * 24),
neg * (self.whole_minutes() - self.whole_hours() * 60),
neg * (self.whole_seconds() - self.whole_minutes() * 60),
i128::from(neg)
* (self.whole_nanoseconds() - i128::from(self.whole_seconds()) * 1_000_000_000)
/ 100 // Ticks
)?;
Ok(())
}