Skip to content

Instantly share code, notes, and snippets.

@russt
Last active August 29, 2015 14:23
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save russt/da5000c909c1e42117ed to your computer and use it in GitHub Desktop.
alias to generate esxcli command to set time and date
#alias to generate esxcli command to set time and date
#this is a csh/tcsh alias:
alias esxidate date -u '"+esxcli system time set --year=%Y --month=%m --day=%d --hour=%H --min=%M --sec=%S"'
#Usage:
% esxidate
esxcli system time set --year=2015 --month=06 --day=17 --hour=20 --min=42 --sec=12
#Use it to set the time on your esxi host via ssh:
% ssh myesxi `esxidate`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment