This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

Timestamp Convert on Selection

Developer Tools · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategoryDeveloper Tools
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

This script adds a floating button that appears when you select a Unix timestamp or a date, allowing you to instantly convert between them. Select a 10-13 digit number and click the button to see the human-readable date in your chosen format and timezone. Select a date string and convert it to both seconds and milliseconds timestamps. The result appears in a popup with copy and replace options. Support includes UTC and local time, three date formats (ISO, MM/DD/YYYY, DD/MM/YYYY), and automatic detection of seconds (10 digits) or milliseconds (13 digits). Perfect for developers working with API timestamps, log files, or database records.

WHERE IT RUNS

The script works on any page with selectable text—API responses, log files, database outputs, configuration files, chat messages, and any page containing Unix timestamps or dates. It works on any website, adding a lightweight tool for quick timestamp conversions without leaving your page.

HOW TO USE

After installation, select any timestamp (10-13 digits) or date string on a page. A floating ⏱ button appears near your selection. Click it to convert—timestamps become readable dates, and dates become timestamps. The result appears in a popup. From the popup, you can copy the result to your clipboard or replace the original selection with the converted value. Use the keyboard shortcut Ctrl+Shift+T to convert the current selection. Open the panel to customize: show/hide the floating button, choose button position, toggle auto-detect, show/hide the popup, enable replace-on-convert, select timezone (UTC or local), choose date format, toggle time display, and enable millisecond detection.

TECHNICAL MECHANISM

The script uses a multi-stage timestamp detection and conversion pipeline. First, it captures text selection using the Selection API, detecting when the user selects text and determining the selection's bounding rectangle for button positioning. Second, it auto-detects the selected text type: Unix timestamps are detected as 10-13 digit numbers within valid date ranges (1970-2100), while dates are detected using JavaScript's Date constructor with validation. Third, it applies the appropriate conversion: timestamps are converted using `new Date(seconds * 1000)` or `new Date(milliseconds)`, then formatted using `getUTC*` or `get*` methods based on the timezone setting. Dates are converted to timestamps using `date.getTime()`. Fourth, it displays results in a floating popup with copy and replace actions. The script uses position tracking to place the button and popup near the selection.

THE PANEL

The settings panel is fully draggable and can be positioned anywhere on your screen. It automatically snaps to the nearest edge when released, keeping your workspace organized. The panel can be collapsed to a small bubble showing only a gear icon, and restored with a single click. Its position is remembered across page reloads using GM_setValue. The panel also responds to the Escape key, which instantly hides it until you click the bubble again. All settings are saved immediately when changed and persist across browser sessions.

PLEASE NOTE

This script requires the free BotGentz extension to run. Timestamp conversion uses the browser's built-in Date object. The script does not access, store, or transmit any personal data or browsing history. All processing happens locally in your browser and never leaves your device.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.