public static int getHostTimeDiffInSec(VcHost vcHost) throws Exception {
HostSystem hostSystem = (HostSystem) vcHost.getManagedObject();
ManagedObjectReference ref = hostSystem.getConfigManager().getDateTimeSystem();
DateTimeSystem dateTimeSystem = MoUtil.getManagedObject(ref);
return (int)(dateTimeSystem.queryDateTime().getTimeInMillis() - System.currentTimeMillis())/1000;
}
}