pipr.tools
Pipes
Clean Email Strip formatting from pasted email for clean plain text Clean AI Output Clean plain text from ChatGPT or AI output Decode & Format JWT Decode a JWT and pretty-print header and payload Word Frequency Count word frequency in text

epoch-to-human Convert Unix timestamp to human-readable date

◷ Time
Input0 chars
Output0 chars

Examples

Convert a Unix timestamp to a readable date

Usage
"1700000000" | epoch-to-human

Decode a timestamp from a customer's error report

Usage
"1718467200" | epoch-to-human

Convert epoch values from a database export to dates

Usage
"1609459200" | epoch-to-human
View source
(input)=>{
                const ts = parseInt(input.trim());
                if (isNaN(ts)) return "Error: provide a numeric Unix timestamp";
                const d = new Date(ts > 1e12 ? ts : ts * 1000);
                return `ISO:   ${d.toISOString()}\nUTC:   ${d.toUTCString()}\nLocal: ${d.toLocaleString()}`;
            }

Related Tools