Ok I have this
var compLength = app.project.activeItem.duration;
var minutes =2
var seconds = 15
var frames = 20;
minSec = (minutes*60)+seconds;
realFrames = frames /app.project.activeItem.frameDuration;
finalDuration = parseFloat (minSec +"."+realFrames);
app.project.activeItem.duration = finalDuration;
But the comp duration still wrong. It has to be 02:15:20 (it’s a 25 frames comp) but the script result is 02:15:13…