Hi paul.90,
Uhmm. Not sure what is happening there. Works on my machine
Try to run a quick Solar Exposure calculation under Analysis > Solar Exposure > Calculate with your object selected. Then re-run the script and see if it works. Also, run the Resource Consumption > Hourly Solar Collection for the same dates and you should get the same result for the total. if that does not work, email me or post your *.eco file here so I can have a look.
Cheers,