If one reads Zhuhr/Asr just before Maghrib (the period between sunset and Maghrib) what is the Niyyat? I called S. Sistani's office and they gave an answer on the lines of 'with the intention that if it is Qadha then it is Qadha, if not then not' but i didn't fully understand it?

If he/she offered before sunset then it is ada means it prayed in time. If it was offered after sunset then it is qadha therefore make sure check if sunset then make Niyat of qadha and If offering before sunset then make Niyat of ada.