How to add custom time in captive portal voucher generation

Is there a way to add custom time in captive portal voucher generation. I want to add 2 hours and 3 hours in code generation.