Because you didn’t show us your code it’s hard to help you.
I’m guessing you want to generate a timestamp in Groovy test code that matches a timestamp generated by a remote server. That will not work.
But, like I said, that’s a guess. I need to see your code. In future, please follow this advice: