Batch timestamp processor

    One Unix timestamp per line (seconds or milliseconds). Results show as UTC ISO strings.

    #InputUTC
    1(empty)

    Related Guides & Tutorials

    // developers also read

    Terminal Equivalent

    Pipe files of epoch values through while-read loops, awk, and xargs for bulk conversion.

    bash
    # Convert a list of timestamps from a file
    while IFS= read -r ts; do
      echo "$ts -> $(date -d @$ts '+%Y-%m-%d %H:%M:%S UTC')"
    done < timestamps.txt
    
    # Process CSV: convert timestamp column
    awk -F',' 'NR>1 {
      cmd = "date -d @" $2 " +\"%Y-%m-%d\""
      cmd | getline date
      close(cmd)
      print $1 "," date "," $3
    }' data.csv
    
    # Batch convert and output to new file
    cat timestamps.txt | xargs -I{} date -d @{} > dates.txt

    How It Works

    Batch processing timestamps is common in data migrations, analytics pipelines, and log analysis. The key is identifying the input format (seconds vs milliseconds), handling invalid values gracefully, and choosing an output format that downstream systems can consume. For large datasets (millions of rows), process in streaming fashion rather than loading all into memory.