"Thus, the lesson to learn is that Energy is only conserved if there's translational time symmetry in the problem.
Which brings us to General Relativity: in several interesting cases in GR, it's simply impossible to properly define a "time" direction! Technically speaking, this would imply a certain global property (called "global hyperbolicity") which not all 4-dimensional spacetimes have. So, in general, Energy is not conserved in GR."