Timeplain

Timestamp Offset Calculator

Calculate a cutoff for logs, expiration windows, or database searches. Enter a starting timestamp and a signed offset. Negative values subtract; positive values add.

Elapsed time: every day here is exactly 24 hours. This is not calendar arithmetic: across a daylight-saving change, adding one day may change the local clock hour.

Now captures one instant; it stays fixed while you adjust the offset. Changing units preserves a valid starting instant.

For example, −15 minutes or 1.5 hours. Values must resolve to whole milliseconds. Changing the duration unit keeps the entered number.

Adjust visually

−15 minutes; slider range −60 to +60.

Quick duration reference

DurationSecondsMilliseconds
1 minute6060,000
5 minutes300300,000
15 minutes900900,000
30 minutes1,8001,800,000
1 hour3,6003,600,000
24 hours86,40086,400,000
7 × 24 hours604,800604,800,000

Example: records from the preceding 15 minutes

Starting at Unix timestamp 1700000000, subtract 900 seconds to get 1699999100. Use event_timestamp >= 1699999100 AND event_timestamp < 1700000000 for a window that includes its start and excludes its end.

Elapsed time versus calendar time

In America/New_York, adding 24 elapsed hours to noon on March 7, 2026 reaches 1 p.m. on March 8. “Noon tomorrow” is only 23 elapsed hours later because the clocks move forward. This calculator always adds a fixed duration to the instant; the display timezone does not change the arithmetic.

For local date interpretation, use the time zone converter. For a column of timestamps, use the batch converter.