CHNAGED:standalone and call  the rotateLayerWithDate function