Skip to content

Network Timestamps and Clock Differences

Network timestamps support cross-source ordering when examiners account for event meaning, timezone, clock offset, drift, and measurement uncertainty.

By Reviewed by Jeevesh Kumar

Last updated:

Two records can show the same packet at different times because the sensors have different clocks, because the packet took time to travel, or because the systems stamped different events. Comparing more decimal places helps only when the timestamps mark comparable events and the clocks support that precision.

Keep original time strings and build an analysis view with a common time reference. Record the source field, offset convention, usable time window, and uncertainty. A corrected time is an estimate whose assumptions belong with the value.

Key terms

Timestamp resolution
The smallest unit represented by a source or export. It limits the precision recoverable from the value.
Clock offset
The difference between a source clock and its reference at a given moment. Record its sign and applicable time window.
Clock drift
Change in clock offset over time. Multiple anchors can show whether a fixed correction is adequate.
Clock step
An abrupt change to displayed wall time. Use clock evidence relevant to each side of the change.
Time anchor
A matching observation or clock measurement with a documented reference time. It can constrain correction within a supported interval.
Time zone offset
The difference between local time and UTC for a particular timestamp. Verify it separately from any device clock error.
More key terms (2)
Time quality
Metadata reflecting the source's reported synchronization or time-zone status. Compare it with independent evidence where precision matters.
Monotonic clock
A clock used to measure local elapsed time without wall-clock jumps. Its comparison scope and treatment of suspension depend on the implementation.

Classify Each Time Field

A packet capture timestamp may come from a network interface, an operating system, or another capture layer. An application may record request arrival or response completion. A collector may assign its own ingestion timestamp. Mark the recorded event type before trying to align data. Converting all fields to the same date format preserves these distinctions.

Label the recorded event before aligning clocks. A common date format preserves the difference between recording points.

Inspect time format, timezone, epoch, unit and precision. A Unix epoch in milliseconds has a different magnitude from the same instant in seconds. A local time without an offset can repeat during a daylight saving change. If source settings or independent evidence fail to establish its timezone, retain every plausible interpretation that matters to the question.

A timestamp rendered to nanoseconds may originate from a clock with lower accuracy. Record both the known resolution and the uncertainty estimate. If a source rounds to the nearest whole second, rounding alone can introduce up to half a second of difference. Confirm rounding behavior before assigning that bound.

Estimate Changes With Time Anchors

Compare preserved time-service reports or events that both sensors can identify. A shared packet marker needs enough context to match the same observation. The expected travel time between sensors adds uncertainty to the apparent offset. A shared request ID can link related application events whose timing differs because of processing.

Define the sign before applying a correction. If offset equals source time minus reference time, a source 300 milliseconds fast has a positive offset of 300 milliseconds. Subtract the offset to convert its timestamp to the reference. Record the raw value, corrected value, and source of the offset estimate.

Keep the raw time, corrected value and evidence for the offset estimate together.

Several anchors across the relevant period help distinguish a stable offset from a changing one. A gradual trend may support a drift estimate. A sudden jump may point to a clock step, restart or change of synchronization source. Fit separate periods when the clock behavior changes and record how far the correction extends beyond measured anchors.

Carry Uncertainty Into Event Ordering

Turn material uncertainty into a time window. Include relevant contributions from log resolution, estimated clock error, and transport or processing time where it affects the comparison. Explain which contributions are measured and which are assumptions. An ingestion timestamp can be much later than the event, so its uncertainty is often asymmetric.

If two corrected windows overlap, the clocks may be unable to establish their order. Related protocol or application evidence may still resolve it. A request can be causally linked to the response by an identifier, even if coarse clocks place both within one second.

For packet timing, compare like points as far as possible. An egress hardware timestamp and an application event time mark different positions in the system. A delay between them can include queuing and software handling. Document the measurement points before attributing the difference to the network.

Make Clock Corrections Reproducible

Keep the source records intact. Store raw time, parser assumptions, converted time, correction model, applicable interval, and uncertainty in the working evidence view. Preserve synchronization health reports or historical settings that anchor your model. A statement that Network Time Protocol (NTP) was enabled provides little information about its health at the event.

Test the correction against observations outside those used to estimate it, when suitable observations exist. A model that fits one matched event can still fail after a restart or across a period of changing clock behavior. Record the residual differences and update the uncertainty if those residuals exceed it.

Report the precision the evidence supports. Millisecond values can help check local sequence. Cross-source ordering can remain unresolved at that scale. Mark events whose order depends on additional assumptions and identify the evidence that might narrow the interval.

Separate Clock Error From Record Delivery Delay

In distributed systems, a source can timestamp an event immediately and send it to a collector much later. Look for source event time, file rotation time, and receipt time in the same artifact. Their ordering helps explain delay. The gap between event and receipt combines clock differences and delivery time unless the two clocks and the pipeline are independently understood.

A software clock may be adjusted while a hardware interface keeps its own clock. If one device produces both types of timestamp, establish the conversion used by the capture tool before comparing values. Keep a clock identifier attached to each field so a correction for one clock is applied only to records that actually use it.

Decode PCAPNG Time at the Interface Level

For a PCAPNG Enhanced Packet Block, use the Interface ID to locate the Interface Description Block within the same file section. Its if_tsresol option gives the timestamp unit. The high bit distinguishes a negative power of ten from a negative power of two. If the option is absent, the unit is one microsecond. A file can describe interfaces with different units, so verify the mapping after a merge. PCAPNG Interface and Timestamp Format Draft

Apply the signed if_tsoffset in seconds when the capture includes it. For a working calculation, convert the timestamp count to seconds and then add that offset. The file offset used to decode the stored value and any separately measured correction for a fast or slow clock address different stages. Read how your analysis tool exports timestamps before applying the file offset again.

Hypothetical practice. A two-interface file stores a count of 12,000,000 on each interface. With decimal resolution 6 the count is 12 seconds. With decimal resolution 7 the same number is 1.2 seconds. These small practice values illustrate the conversion before offsets. Store the section, interface, raw count and resolution if that conversion matters to a finding. The PCAP and PCAPNG lesson explains how those blocks are related.

Read PCAPNG timestamp resolution in the packet’s interface description, then apply any stored interface offset.

Calculate a Duration Range From Two Event Windows

A useful cross-source duration can remain a range. For an ordered event pair, subtract the latest plausible start from the earliest plausible finish for the lower bound. Subtract the earliest plausible start from the latest plausible finish for the upper bound. This calculation uses the ends of the two windows and needs no assumption about a probability distribution within them.

Hypothetical practice. The corrected start of a request falls between 10:15:42.090 and 10:15:42.130, inclusive. The matched response falls between 10:15:42.160 and 10:15:42.220. In these bounds the response follows the request by at least 30 and at most 130 milliseconds. Whether it met a 100-millisecond target remains unresolved. A midpoint calculation would give an 80-millisecond estimate and hide the possibility of exceeding the target.

Pair latest start with earliest response for the lower bound and earliest start with latest response for the upper bound. The 100-millisecond target remains unresolved.

Keep the type of duration with the numbers. For example, a client-side send and a client-side receive bracket a turnaround at that observation point. A server's handler entries might measure processing only. If both events share a stable clock offset, that common error cancels in their difference. Timing resolution and any change in offset between those events can still affect the range.

Decode Explicit Offsets and Keep Ambiguous Local Times Open

Record the original timestamp and its format before converting it to Coordinated Universal Time (UTC). RFC 3339 defines numeric offsets whose sign represents local time minus UTC. A legacy -00:00 value indicates a known UTC time with an unknown local offset. RFC 9557 recommends Z for this purpose in extended timestamps.

An unqualified local time requires a separate basis for conversion and can be ambiguous across time-zone transitions. RFC 3339 on Local Offsets and RFC 9557 on Unknown Local Offsets.

Hypothetical practice. A source row reads 09:10:00 with a numeric offset of plus 05:30. Its normalized time is 03:40:00 UTC. Another source shows 09:10:00 with no offset. Even if the systems are in the same office, the second string alone leaves its offset unresolved.

Check the historical logging settings, originator configuration or a verified event recorded by both systems. If a daylight-saving fallback produced two possible UTC values for a local time, retain both candidates until a scoped source can distinguish them.

Record the offset or named zone used, its evidentiary basis and when the setting was known to apply. A spreadsheet that imports timestamps using the analyst's settings can hide that conversion. Compare rendered values with a few manually verified originals before relying on the normalized column. Building a Network Evidence Timeline

Test What a Source Claims About Its Clock

Some records carry information about time quality. RFC 5424 syslog can include timeQuality parameters for whether the originator knows its time zone, whether its time is synchronized and, if applicable, its reported synchronization accuracy. The syncAccuracy value expresses the originator's estimate in microseconds. Preserve that metadata with the original timestamp and identify whether it came from the originator or a relay-generated replacement. RFC 5424 on Syslog Time Quality

Hypothetical practice. An archived syslog export reports isSynced as 1 and syncAccuracy as 20000 for a firewall event. That expresses a claimed accuracy of 20 milliseconds for synchronization. A peer system's clock is independently bounded to one second. An apparent 200-millisecond lead in the firewall record cannot establish cross-source order from those bounds alone. Include the granularity of each field and confirm what stage generated the event time before comparing them.

Investigate a mismatch between declared and observed time quality. Clock monitoring closest to the event may show a source change, a resynchronization or an interval with missing telemetry. Use independently matched anchors when available and record their own uncertainty. A synchronization flag in a record is evidence about the source's reported state and can guide those checks.

Preserve Local Durations Across a Wall-Clock Step

A wall clock places events on a civil timeline. A monotonic clock measures the progression of time within a clock domain and can be useful for elapsed intervals across a wall-clock adjustment. The Linux kernel, for example, distinguishes monotonic and realtime clock accessors and documents how suspend affects available clocks. Check whether an application duration was derived from a supported monotonic clock and whether the values belong to the same boot and clock domain. Linux Kernel Timekeeping Documentation

Hypothetical practice. A saved application entry reports a monotonic operation duration of 140 milliseconds. Its corresponding wall-clock labels appear to end two seconds before the start, and a time-service log places a backward clock step between them. The duration can remain usable if its measurement method and pairing are verified. Reconstruct the start and finish on the UTC timeline with evidence appropriate to each side of the step.

Check that the duration uses a supported monotonic clock and the values belong to the same boot and clock domain.

Document the stored units and how the duration was obtained. A printed duration calculated from wall-clock fields can share the error affecting those fields. A counter that resets after restart cannot directly measure across that boundary. When suspension matters, distinguish elapsed runtime according to the documented clock from real elapsed time experienced by an external observer. Keep a duration estimate scoped to the observation it measures.

Casework Example

Lesson Review

Check Your Understanding

Question 1 of 5· 0 answered
A source clock is 300 milliseconds fast. Which adjustment aligns it to the reference?

Test yourself on Network Forensics with free, timed mocks.

Practice Network Forensics questions

Found this useful? Pass it along.