    # session timeout
    # NB: deliberately keyed off httpd-admin{ManagerTimeout} only - this is the
    # same property that drives TKTAuthTimeout in AuthTKT.cfg (see e-smith-manager's
    # manager_access template). Do not add a separate smanager{Timeout} override here:
    # the AuthTkt ticket timeout has no matching knob, so a second property would let
    # the Mojolicious session and the auth_tkt cookie drift out of sync silently.
    timeout => '{ 

my $raw_timeout = ${'httpd-admin'}{ManagerTimeout} || "30m"; 

my ($val, $unit) = $raw_timeout =~ /^(\d+)([smhd]?)$/i;

my %multipliers = (
        ''  => 1,        # Raw number defaults to seconds
        's' => 1,        # Seconds
        'm' => 60,       # Minutes
        'h' => 3600,     # Hours
        'd' => 86400,    # Days
   );
# fallback to the default 1800 s or 30m if malformed
$OUT = ($val && exists $multipliers{lc($unit)}) 
                ? $val * $multipliers{lc($unit)} 
                : 1800;

}',
