For an $n$-dimensional Lorentzian manifold $M$, it is a standard theorem in differential geometry that
$M$ has a zero Riemann curvature tensor iff it is locally isometric to $n$-dimensional Minkowski space
What immediately caught my attention was that zero curvature just restricts $M$ to being locally isometric to Minkowski space. This does not imply that $M$ must be the Minkowski space itself. That is, there possibly can exist Lorentzian manifolds with zero curvature which are not the Minkowski space. However, I could not come up with any examples on my own, nor was I able to find any examples on searching.
So, are there any examples of such spaces?
Additionally, if there are many examples (which I suspect to be the case), is it possible to get an example for such a manifold for every value of the dimension $n$? If this is not possible, does there exist an example for $4$-dimensional Lorentzian manifolds? This is the case I'm most interested in.
You could take $M = \mathbb R \times \mathbb T^3$ with $\text ds^2 = -\text dt^2 + \text d\vec x^2$ where $\text d\vec x^2$ is the flat euclidean metric on the $3$-dimensional torus $\mathbb T^3$.