Articles in this section

Batch Timestamp Rounding

Summary

Factbird rounds batch timestamps to fixed 30-second intervals to support consistent analytics, KPI calculations, and time-series aggregation. This behavior affects how batch start and stop times are stored and displayed through the API.

 

What This Is

  • Batch Timestamp Rounding is the process Factbird uses to normalize batch timestamps to a shared 30-second time grid.
     
  • Batch start times (actualStart) are rounded down:
    • :00.000
    • :30.000
       
  • Batch stop times (actualStop) are rounded up:
    • :29.999
    • :59.999

Why It Matters

  • Consistent timestamp alignment helps Factbird:
    • Calculate OEE accurately
    • Aggregate production data consistently
    • Generate stable KPI reporting
    • Standardize analytics across datasets

When You Would Use This

Use this when:
  • Reviewing batch timestamps through the API
  • Working with XML batch imports
  • Investigating shifted or rounded timestamps
  • Building automated batch integrations

How It Works

  • Each minute is divided into two 30-second intervals:
    • 00.000 29.999
    • 30.000 59.999
       
  • actualStart values are rounded down to the beginning of the current interval.
    • 11:10:17.500Z → 11:10:00.000Z
       
  • actualStop values are rounded up to the end of the current interval.
    • 11:10:17.000Z → 11:10:29.999Z
       
  • Because timestamps are normalized after ingestion, batches that occur only seconds apart may appear shifted in stored data.
     
  • For XML imports, normalization can also create actual overlaps between consecutive batches.
    • Example:
      • Batch A stop: 11:10:31 → 11:10:59.999
      • Batch B start: 11:10:32 → 11:10:30.000
         
  • In this example, the normalized batch ranges overlap even though the original timestamps do not.
     
  • Since Factbird does not allow overlapping batches, the second batch may fail to start or import correctly.

Key Terms / Components

  • actualStart:
    • The normalized batch start timestamp.
       
  • actualStop:
    • The normalized batch stop timestamp.
       
  • 30-Second Interval:
    • The fixed time window used for timestamp alignment.
       
  • Timestamp Normalization:
    • The process of adjusting timestamps to standard interval boundaries.

Common Misunderstandings

  • The timestamps are incorrect.
    • The rounding behavior is intentional.
       
  • Gaps between batches mean missing data.
    • Small gaps or shifts are expected after normalization.
       
  • Exact XML timestamps are preserved.
    • Imported timestamps are still normalized to 30-second intervals.
       
  • Closely timed batches cannot overlap.
    • After rounding, batches within the same interval may overlap, which may cause the second batch to fail to start or import.

Related Articles

Was this article helpful?
0 out of 0 found this helpful