blob: a69d13755d6d424290ed7f6ea2cc03fc9363b06d (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#!/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)"
|