#!/bin/sh # Set date on remote machine from local one. This version works # from MacOS to AlpineLinux. It is intended to re-sync clock of a # virtual machine after host wakeup. # TODO: option to display the time difference between host and remote. # hint: use 'date +%s' to get timestamp in seconds since epoch. ssh "$1" "sudo date $(date +%m%d%H%M%Y.%S)"