I works fine for me. Wait, I know why. You have to save before you move on to the next pokemon. Say I am switching Treeko and Grovyle. I change Treeko's number to 02. If I move onto Grovyle before I save, my changes to Treeko will be reversed. So now if I change Grovyle to 01, both Treeko and Grovyle occupy the same spot, leaving slot #02 blank.
I did, and I am dumbfounded. The script compiled flawlessly. Then I was able to replicate what happened. So, I opened the memory viewer, took a look at the rtc clock and it was running fine. Then I watched the ram change as the script ran and I noticed it wasn't copying anything but the year and the month over to be used later. Everything else stayed the same.
So, I watched the script happen on FR and I was surprised to learn that all of the date and time were copied over. I don't know where the miscommunication is on Ruby, but it isn't accomplishing the very first step.