Step 1: Effective gravity in an accelerating frame.
In a frame accelerating horizontally with acceleration $a$, the pendulum experiences an effective gravity:
\[
g_{\text{eff}}=\sqrt{g^2+a^2}
\]
Step 2: Time period of a simple pendulum.
For small oscillations, the time period is:
\[
T = 2\pi \sqrt{\frac{L}{g_{\text{eff}}}}
\]
Step 3: Substitute effective gravity.
\[
T = 2\pi \sqrt{\frac{L}{\sqrt{g^2+a^2}}}
= 2\pi \sqrt{L}\,(g^2+a^2)^{-1/4}
\]
Step 4: Conclusion.
The period of oscillation is $2\pi \sqrt{L}\,(a^2+g^2)^{-1/4}$.