One beat is a quarter note, and a pulse is a tick, so with 100 BPM and 960 PPQ, you have 100 × 960 = 96000 ticks per minute. This is 96000 / 60 = 1600 ticks per second.
So the time, in seconds, is 34560 / 1600 = 21.6 s; the duration is 1920 / 1600 = 1.2 s.
A "quarter note" is just used as a unit of time, and not necessarily related to actual notes or bars in the song.
(MIDI files actually do not use BPM but a tempo value measured in microseconds per quarter note, i.e., BPM = 1000000 × 60 / tempo, or tempo = 1000000 × 60 / BPM.)
Please note that the tempo/BPM can change at any time, so you should compute all times relative to the last event. (See
How to correctly convert MIDI ticks to milliseconds? for details.)