Living Document Notice
Published 2026-09-17. The evolving architecture, revisions, and connected notes for this dispatch live in the Stax Digital Garden.
ISO 8601 UTC Interval Arithmetic in Local Markdown Headers
Time tracking within plain-text notes often relies on unstructured timestamps like 9:30 AM or after lunch. These formats defy automated aggregation, break across timezone shifts, and prevent deterministic calculation of work duration. Logbook mandates standard ISO 8601 UTC representation across all temporal entry headers.
Structural Interval Grammar
Logbook parses section headers formatted according to ISO 8601 interval grammar:
### 2026-09-17T13:00:00Z/2026-09-17T14:45:00Z - Kernel Profiling
- Isolated L2 cache misses on thread worker pool.
- Tuned jemalloc arena count from 8 to 4.The header specifies explicit start and end instants separated by a solidus (/). When an activity remains in progress, an open-ended instant is parsed:
### 2026-09-17T15:00:00Z/.. - Network Firmware FlashingThe double dot (..) designates an unbounded interval whose duration evaluates against now() during runtime queries.
Deterministic Interval Evaluation
The parser extracts timestamps and performs duration arithmetic directly in nanoseconds:
use chrono::{DateTime, Utc, Duration};
pub struct TimeInterval {
pub start: DateTime<Utc>,
pub end: Option<DateTime<Utc>>,
}
impl TimeInterval {
pub fn duration_minutes(&self, current_time: DateTime<Utc>) -> i64 {
let terminal = self.end.unwrap_or(current_time);
(terminal - self.start).num_minutes()
}
}This representation eliminates ambiguity across daylight saving transitions and travel across flight corridors. A local CLI tool parses the markdown file in 2 milliseconds and generates accurate daily timesheet summaries without external database dependencies.
- Directus Target: logbook
- Garden Source Reference: MOC - Daily Log & Chronological Journal, MOC - Bosun PKM Tools
- Garden Source Reference: [LOG-1004 - ISO 8601 UTC Interval Arithmetic in Local Markdown Headers](LOG-1004 - ISO 8601 UTC Interval Arithmetic in Local Markdown Headers)