"It was" is translated as era or estaba. I know for statements like "It was happy with you" (contigo estaba feliz) that works.
But what about constructions where the "it" is nothing in specific? Such as "It was only when I realized that she was a man did I...", or (using the present) "It's that time again, when...". For these, would era and es still apply?
For example:
It was when I saw the tiger that I became afraid.
My guess at a translation:
Era cuando veía el tigre que estoy asustado.
Also, I had a bit of trouble picking ser vs estar for these constructions. Ser was described to me as being used with something's identity. In these cases, I figured "It was" referred to the identity of the time period. Is this correct?