Time & time zones

Preserve timestamp order for records before 1970

Check negative Unix values, millisecond precision and the rounded whole-second boundary.

A value of minus one millisecond is the last millisecond of 1969 UTC. A value of minus one second is a full second before the epoch. A workbench should display the correct UTC date and retain the source’s precision.

If a system stores whole seconds using floor, both readings are in the preceding whole second. A truncation convention toward zero can give different integer results for a fractional negative value.

Use epoch values to reproduce the main comparisons.

What belongs in the final record

Keep the raw instant and check how the destination reports dates before its epoch.

Encoded value -2208831825

A local time known only as a clock label and regional date is a different input. Resolve it to the timeline first, checking the correct occurrence when it is a repeated time.

Read as Unix seconds. 1900-01-02T19:36:15.000Z. Read as Unix milliseconds. 1969-12-06T10:26:08.175Z.

Save the exact source number with its documented unit. For log imports, preserve the millisecond position whenever the numeric scale provides it.

The first interpretation is -2208831825000 milliseconds relative to the epoch. The second is -2208831825. Unit selection alters the represented time even though the original digits remain identical. Compare with a trusted event date from the file.

Encoded value -2208819750

Read as Unix seconds. 1900-01-02T22:57:30.000Z. Read as Unix milliseconds. 1969-12-06T10:26:20.250Z.

The first interpretation is -2208819750000 milliseconds relative to the epoch. The second is -2208819750. Unit selection alters the represented time even though the original digits remain identical. Compare with a trusted event date from the file.

A precision check under the declared millisecond interpretation adds exactly 125 units to -2208819750. The first UTC value is 1969-12-06T10:26:20.250Z and the second is 1969-12-06T10:26:20.375Z. This is a short interval suitable for checking ordering of nearby events. Repeat with a known source reading before applying a size-based guess about the numeric field. A system storing whole seconds can group distinct positions within the same second.

Pros and cons of the approach

Pros. Keeping milliseconds makes it possible to distinguish events within the same displayed second.

Cons. A rounding rule can lose precise order when many records share a coarse time field.

Record whether a summary uses rounded, floored or truncated values.

A worked record and its alternatives

The following examples compare seconds and milliseconds applied to the same stored number. Check a known negative example and compare typed units without relying on formatting.

Encoded value -2208988800

Read as Unix seconds. 1900-01-01T00:00:00.000Z. Read as Unix milliseconds. 1969-12-06T10:23:31.200Z.

The first interpretation is -2208988800000 milliseconds relative to the epoch. The second is -2208988800. Unit selection alters the represented time even though the original digits remain identical. Compare with a trusted event date from the file.

Encoded value -2208976725

Read as Unix seconds. 1900-01-01T03:21:15.000Z. Read as Unix milliseconds. 1969-12-06T10:23:43.275Z.

The first interpretation is -2208976725000 milliseconds relative to the epoch. The second is -2208976725. Unit selection alters the represented time even though the original digits remain identical. Compare with a trusted event date from the file.

A precision check under the declared millisecond interpretation adds exactly 125 units to -2208976725. The first UTC value is 1969-12-06T10:23:43.275Z and the second is 1969-12-06T10:23:43.400Z. This is a short interval suitable for checking ordering of nearby events. Repeat with a known source reading before applying a size-based guess about the numeric field. A system storing whole seconds can group distinct positions within the same second.

Encoded value -2208964650

The first interpretation is -2208964650000 milliseconds relative to the epoch. The second is -2208964650. Unit selection alters the represented time even though the original digits remain identical. Compare with a trusted event date from the file.

  • Read as Unix seconds · 1900-01-01T06:42:30.000Z
  • Read as Unix milliseconds · 1969-12-06T10:23:55.350Z

A precision check under the declared millisecond interpretation adds exactly 125 units to -2208964650. The first UTC value is 1969-12-06T10:23:55.350Z and the second is 1969-12-06T10:23:55.475Z. This is a short interval suitable for checking ordering of nearby events. Repeat with a known source reading before applying a size-based guess about the numeric field. A system storing whole seconds can group distinct positions within the same second.

Clock reading 15:21:15

The same form accepts a suffix-bearing input. Enter 3:21:15 PM to verify that the 24-hour value is restored.

Applied choiceComputed value
Use 24-hour notation15:21:15
Use 12-hour notation3:21:15 PM

The hour can carry a suffix in one representation and a 00-to-23 value in another. The minute stays in the same place. If seconds appear, both outputs retain them. The calculated position since midnight is 55,275 seconds.

Add the actual date and zone when converting an event or deadline. In a booking record written near midnight, choose the intended calendar date before copying the converted clock label.

Encoded value -2208940500

Read as Unix seconds. 1900-01-01T13:25:00.000Z. Read as Unix milliseconds. 1969-12-06T10:24:19.500Z.

The first interpretation is -2208940500000 milliseconds relative to the epoch. The second is -2208940500. Unit selection alters the represented time even though the original digits remain identical. Compare with a trusted event date from the file.

A precision check under the declared millisecond interpretation adds exactly 125 units to -2208940500. The first UTC value is 1969-12-06T10:24:19.500Z and the second is 1969-12-06T10:24:19.625Z. This is a short interval suitable for checking ordering of nearby events. Repeat with a known source reading before applying a size-based guess about the numeric field. A system storing whole seconds can group distinct positions within the same second.

Encoded value -2208928425

Read as Unix seconds. 1900-01-01T16:46:15.000Z. Read as Unix milliseconds. 1969-12-06T10:24:31.575Z.

The first interpretation is -2208928425000 milliseconds relative to the epoch. The second is -2208928425. Unit selection alters the represented time even though the original digits remain identical. Compare with a trusted event date from the file.

A precision check under the declared millisecond interpretation adds exactly 125 units to -2208928425. The first UTC value is 1969-12-06T10:24:31.575Z and the second is 1969-12-06T10:24:31.700Z. This is a short interval suitable for checking ordering of nearby events. Repeat with a known source reading before applying a size-based guess about the numeric field. A system storing whole seconds can group distinct positions within the same second.

Records to compare before using this method

Compare the stated conditions and retain the date or instant associated with each reading.

Recorded exampleFirst settingFirst resultComparison settingComparison result
Encoded value -2208916350Read as Unix seconds1900-01-01T20:07:30.000ZRead as Unix milliseconds1969-12-06T10:24:43.650Z
Clock reading 19:49:15Use 24-hour notation19:49:15Use 12-hour notation7:49:15 PM
Encoded value -2208892200Read as Unix seconds1900-01-02T02:50:00.000ZRead as Unix milliseconds1969-12-06T10:25:07.800Z
Encoded value -2208880125Read as Unix seconds1900-01-02T06:11:15.000ZRead as Unix milliseconds1969-12-06T10:25:19.875Z
Encoded value -2208868050Read as Unix seconds1900-01-02T09:32:30.000ZRead as Unix milliseconds1969-12-06T10:25:31.950Z
Clock reading 23:17:15Use 24-hour notation23:17:15Use 12-hour notation11:17:15 PM
Encoded value -2208843900Read as Unix seconds1900-01-02T16:15:00.000ZRead as Unix milliseconds1969-12-06T10:25:56.100Z

Start near the epoch with a signed example

Preserve the signed numeric field and documented scale. Use an ordered pair close to the boundary as an import test.

Clock reading 03:45:15

The same form accepts a suffix-bearing input. Enter 3:45:15 AM to verify that the 24-hour value is restored.

Applied choiceComputed value
Use 24-hour notation03:45:15
Use 12-hour notation3:45:15 AM

The hour can carry a suffix in one representation and a 00-to-23 value in another. The minute stays in the same place. If seconds appear, both outputs retain them. The calculated position since midnight is 13,515 seconds.

Encoded value -2208795600

Read as Unix seconds. 1900-01-03T05:40:00.000Z. Read as Unix milliseconds. 1969-12-06T10:26:44.400Z.

The first interpretation is -2208795600000 milliseconds relative to the epoch. The second is -2208795600. Unit selection alters the represented time even though the original digits remain identical. Compare with a trusted event date from the file.

A precision check under the declared millisecond interpretation adds exactly 125 units to -2208795600. The first UTC value is 1969-12-06T10:26:44.400Z and the second is 1969-12-06T10:26:44.525Z. This is a short interval suitable for checking ordering of nearby events. Repeat with a known source reading before applying a size-based guess about the numeric field. A system storing whole seconds can group distinct positions within the same second.

Encoded value -2208783525

Read as Unix seconds. 1900-01-03T09:01:15.000Z. Read as Unix milliseconds. 1969-12-06T10:26:56.475Z.

The first interpretation is -2208783525000 milliseconds relative to the epoch. The second is -2208783525. Unit selection alters the represented time even though the original digits remain identical. Compare with a trusted event date from the file.

A precision check under the declared millisecond interpretation adds exactly 125 units to -2208783525. The first UTC value is 1969-12-06T10:26:56.475Z and the second is 1969-12-06T10:26:56.600Z. This is a short interval suitable for checking ordering of nearby events. Repeat with a known source reading before applying a size-based guess about the numeric field. A system storing whole seconds can group distinct positions within the same second.

Encoded value -2208771450

The first interpretation is -2208771450000 milliseconds relative to the epoch. The second is -2208771450. Unit selection alters the represented time even though the original digits remain identical. Compare with a trusted event date from the file.

  • Read as Unix seconds · 1900-01-03T12:22:30.000Z
  • Read as Unix milliseconds · 1969-12-06T10:27:08.550Z

Clock reading 07:13:15

The same form accepts a suffix-bearing input. Enter 7:13:15 AM to verify that the 24-hour value is restored.

Applied choiceComputed value
Use 24-hour notation07:13:15
Use 12-hour notation7:13:15 AM

The hour can carry a suffix in one representation and a 00-to-23 value in another. The minute stays in the same place. If seconds appear, both outputs retain them. The calculated position since midnight is 25,995 seconds.

Encoded value -2208747300

Read as Unix seconds. 1900-01-03T19:05:00.000Z. Read as Unix milliseconds. 1969-12-06T10:27:32.700Z.

The first interpretation is -2208747300000 milliseconds relative to the epoch. The second is -2208747300. Unit selection alters the represented time even though the original digits remain identical. Compare with a trusted event date from the file.

A precision check under the declared millisecond interpretation adds exactly 125 units to -2208747300. The first UTC value is 1969-12-06T10:27:32.700Z and the second is 1969-12-06T10:27:32.825Z. This is a short interval suitable for checking ordering of nearby events. Repeat with a known source reading before applying a size-based guess about the numeric field. A system storing whole seconds can group distinct positions within the same second.

Questions readers may need to resolve

Does a negative Unix value describe invalid data?

It can identify a valid instant before the epoch. Confirm the domain of the source field.

Why does minus one millisecond display a 1969 date?

It is immediately before UTC midnight at the start of 1970.

Can UTC dates reproduce the original number?

A timestamp with sufficient precision can be mapped back under the same units.

Does sort order depend on city time?

Sort by the original instant. Formatted local labels can be repeated or adjusted.

Can I preserve nanoseconds in a displayed browser date?

A browser date has millisecond precision. Keep a finer source value separately.

What stays fixed in the Encoded value -2208916350 comparison?

The source example stays fixed while the method changes from Read as Unix seconds to Read as Unix milliseconds. The first reading gives 1900-01-01T20:07:30.000Z and the comparison gives 1969-12-06T10:24:43.650Z. Save the exact source number with its documented unit. For log imports, preserve the millisecond position whenever the numeric scale provides it.

Which details let me reproduce the Clock reading 23:17:15 example?

The same form accepts a suffix-bearing input. Enter 11:17:15 PM to verify that the 24-hour value is restored. Add the actual date and zone when converting an event or deadline. In a booking record written near midnight, choose the intended calendar date before copying the converted clock label.

How should I read the result in the Encoded value -2208843900 example?

The first interpretation is -2208843900000 milliseconds relative to the epoch. The second is -2208843900. Unit selection alters the represented time even though the original digits remain identical. Compare with a trusted event date from the file.

Explore the other Daylooply articles →