You seem to be asking for a higher order approximation to the acceleration due to gravity based on its variation with height. So if the Earth's mass is $M$, and we're at a radius $R$ from its centre, then for a small radial displacement $h$ from this, the acceleration due to gravity is:
$$g = \frac{GM}{(R+h)^2} \approx \frac{GM}{R^2}\left(1 - \frac{2h}{R} + \frac{3h^2}{R^2} +\ ...\right)$$
where $G$ is the gravitational constant. There are infinite terms in the expansion, but we can neglect them since $\frac{h}{R} \ll 1$ by assumption.
Now, for a pendulum inclined at an angle $\theta$ to the vertical, the angular acceleration is given by:
$$a = -g\sin\theta$$
while, from trigonometry, we also have $h = L(1-\cos\theta)$, where $L$ is the length of the pendulum.
Putting the two together, we have the following equation of motion:
$$I\frac{d^2 \theta}{dt^2} = -gL\sin\theta$$
$$\frac{d^2 \theta}{dt^2} \approx -\frac{GM}{IR^2}L\sin\theta\left(1-\frac{2L(1-\cos\theta)}{R}\right)$$
where $I$ is the moment of inertia of the pendulum, and $I = mL^2$ for a simple pendulum with a bob of mass $m$. We can also go ahead and put in the small angle approximation:
$$\sin\theta \approx \theta$$
$$\cos\theta \approx 1-\frac{\theta^2}{2}$$
This gives us:
$$\frac{d^2 \theta}{dt^2} \approx -\frac{GM}{IR^2}L\theta\left(1-\frac{L}{R}\theta^2\right)$$
Now observe something: for any reasonable pendulum, $L \ll R$. In addition, we have $\theta \ll 1$. The leading correction due to the variation of gravity is already third order, and may be safely neglected for small oscillations.
But what if we chose not to neglect it? Integrating these equations of motion is not very easy, so we can instead use the 'Energy' approach. The force corresponds to a 'potential energy' of:
$$V(\theta) = \frac{GM}{2R^2}L\theta^2 - \frac{GM}{4R^3}{L^2}\theta^4$$
We can use energy conservation:
$$E = \frac{1}{2}I\left(\frac{d\theta}{dt}\right)^2 + \frac{GM}{2R^2}L\theta^2 - \frac{GM}{4R^3}{L^2}\theta^4$$
After some manipulation, we get the following expression for the time period (observing that the oscillations are symmetric):
$$T = 2\int_{-\Theta}^{\Theta}\frac{\sqrt{I}d\theta}{\sqrt{2}\sqrt{E-\left(\frac{GM}{2R^2}L\theta^2 - \frac{GM}{4R^3}{L^2}\theta^4 \right)}}$$
where $\Theta$ is the amplitude (angle). This integral has a solution, but it is too tedious to evaluate, and this is where I will stop. In practice, you can use a numerical integration software to solve this, for a given amplitude, and that will give you the corrected time period.
You can estimate the rough magnitude of the correction (in $g$) for a 2 degree amplitude, assuming that the radius of the Earth is $\approx 6400\text{km}$, to be:
$$\frac{L\Theta^2}{R} = \frac{0.994}{6400000}*\frac{2^2 4\pi^2}{360^2} \sim 10^{-10}$$
All we can say is that this is much weaker than the tidal effect, which, according to this link produces a correction of $\sim 10^{-7}$ for the moon and $\sim 10^{-8}$ for the sun. That's a factor of at least $100$ smaller.
Now, a related link says that the tidal effect is detectable only by the best pendulums. So the effect due to the variation of $g$ with height is probably out of reach. However, if you don't restrict yourself to small angles, then the correction is more or less only $$\frac{L}{R} \approx 10^{-7}$$
which is comparable to the tidal effect. However, for large angles the bigger problem would be that it would no longer be a 'second' pendulum, likely having been calibrated only for small angles, and one would need new calculations of its time period in a uniform gravitational field.