Any way to get panel-wise time range in applyTemplateVariables?

It seems that scoped_value does not include time range information overridden by panel query options, such as Relative time and Time offset.
getTemplateSrv().replace resolves $from and $to with global dashboard-wise time range.
Is there any way to acquire a panel-wise time range in applyTemplateVariables?