Temporal adjustment using graph theory