Need to use the last file but copy past does't save the real date and time

Have you tried these already existing, solved forum threads?

The solution suggests code very similar to your code here, but with slight difference.
I hope one of them will help you find what’s missing in your code.