10 lines
305 B
Bash
10 lines
305 B
Bash
#!/bin/sh
|
|
# /usr/local/sbin/www/api/time — Allxon Bolt time CGI
|
|
# Returns current Unix timestamp in JSON.
|
|
# Same response format as the KL630 mock server GET /api/time.
|
|
#
|
|
# Response: {"unix": <epoch_seconds>}
|
|
printf "Content-Type: application/json\r\n"
|
|
printf "\r\n"
|
|
printf '{"unix": %s}' "$(date +%s)"
|