# Weak formulation for evolution problem with non-homogeneous boundary datum

If we are given the classical heat equation:

$$\cases{ u_t-\Delta u = f \qquad Q_t \\ u(x,0)=g(x) \qquad \Omega \\ u=0 \qquad S_T}$$ then we can formulate a weak problem using Sobolev spaces depending on time, the final result will be something like: find $u \in L^2(0,T; H^1_0(\Omega)) \cap H^1_0(0,T; H^{-1}(\Omega))$ such that $u(x,0)=g$ and

$$\langle u_t,v \rangle_{H^{-1} \times H^1_0} + (\nabla u, \nabla v)_{L^2} = (f,v)_{L^2} \qquad \text{a.e} \ \ t \in [0,T], \ \ \forall v \in H^1_0(\Omega)$$

where the RHS may also be viewed as duality between $H^{-1}$ and $H^1_0$, depending on the regularity of $f$.

Now I would like to write a weak formulation for the same problem but with non homogeneous Dirichlet condition, say $u=h$ on $S_T = \partial \Omega \times (0,T]$. When dealing with weak formulations for elliptic problems, I simply consider a lift of the datum $h$ (if the domain and $h$ itself are sufficiently regular), i.e a function such that $\gamma_0 (u_h) = h$, and with the change of variable $u_0 = u - u_h$ I go back to the homogeneous problem. Does this also work for evolution problems? Although I think it might be similar, I've never read or seen anything about traces or lifts in spaces depending on time. Thanks in advance.