21 lines
694 B
Bash
Executable file
21 lines
694 B
Bash
Executable file
#!/bin/bash
|
|
# Quick script to check production server time via Elixir remote console
|
|
|
|
echo "=== Checking Production Server Time ==="
|
|
echo ""
|
|
echo "Running remote Elixir command..."
|
|
echo ""
|
|
|
|
kubectl exec -it -n towerops deployment/towerops -- bin/towerops rpc "
|
|
IO.puts(\"System.system_time(:second): #{System.system_time(:second)}\")
|
|
IO.puts(\"DateTime.utc_now(): #{DateTime.utc_now()}\")
|
|
IO.puts(\"\")
|
|
IO.puts(\"Expected UTC now: #{DateTime.from_unix!(System.system_time(:second))}\")
|
|
"
|
|
|
|
echo ""
|
|
echo "=== Current UTC Time (from local machine) ==="
|
|
date -u
|
|
echo ""
|
|
echo "Compare the times above. If they differ by more than a few seconds,"
|
|
echo "the production server's clock is out of sync."
|