Another exercise in differential geometry using Gauss Bonnet Consider the surface $M=\{(x,y,z) \mid x^2+y^2-z^2=1 \,\text{and} -1<z<1\}$ and calculate $\int_{M}KdA$ where $K$ is the Gaussian curvature. 
Solution;
Geometrically this is the part of the one-sheeted hyperboloid between $-1$ and $1$.
We simply apply Gauss-Bonnet for compact surfaces and get that
$\int_{M}KdA=0$ due to the Euler characterisitc being $F-E+V=2-2+0$
Is this correct?
 A: No, this is not correct. At each point of the hyperboloid the gaussian curvature is negative  so the integral over the curvature must be negative aswell.
The problem is that $M$  is not compact so you cannot use Gauss-Bonnet directly. If you want to use Gauss-Bonnet you could consider $\bar M=\{(x,y,z) \mid x^2+y^2-z^2=1 \,\text{and} -1\leq z\leq 1\}$. The integral of the curvature is the same since the difference Between $\bar M$ and $M$ is a measure zero set.
Now $\bar M$ is a compact two-dimensional Riemannian manifold with  boundary so by Gauss-Bonnet
$$\int_{ M} K\;dA=\int_{\bar M} K\;dA=2\pi\chi(\bar M)-\int_{\partial \bar M}k_g\;ds=0-\int_{\partial \bar M}k_g$$
so what's left to do is  to calculate the geodesic curvature of the boundary.

$\textbf{Edit:}$ 
Let $S\subseteq \mathbb R^n$ be a compact two-dimensional Riemannian manifold with boundary. The question is how to compute $\int_{\partial S}k_g\ ds$. This can be done as follows:
Let $B_i$ be the connected components of the boundary. Then each $B_i$ is diffeomorphic to a circle. For fixed $i$ choose a regular paramatrization $\gamma: [a,b]\to B_i$ (not necessarily unit-speed but atleast $C^2$) and set $T=\gamma'/|\gamma'|$. Let $\eta(t)$ bet the unit tangent vector at $\gamma(t)$ which is orthogonal to $\gamma'(t)$ and points inwards into the manifold. Then $\kappa_g\circ\gamma=\frac{1}{|\gamma'|}\langle T',\eta\rangle$ and $\int_{ B_i}k_g\ ds=\int_a^b\langle T',\eta\rangle \ dt$. Finally $\int_{\partial S}k_g\ ds=\sum_i\int_{ B_i}k_g\ ds$.
One  remark:
 If $M\subseteq \mathbb R^3$ is orientable and $N$ is the gauss map (for some chosen orientation) then $\eta=\pm\ T\times (N\circ\gamma)$. How to get the sign right? Well let $x(u,v):W\to M$ be a regular parametrization arround $\gamma(t)$ where $W\subseteq\mathbb R_{\geq 0}\times\mathbb R$ is open. Then we have to choose the sign such that $\langle x_u(\gamma(t)),\eta(t)\rangle>0$.

Now let's do this for  $\bar M=\{(x,y,z) \mid x^2+y^2-z^2=1, \,-1\leq z\leq 1\}$. The boundary has two connected components: $B_1=\{(x,y,z) \mid x^2+y^2-z^2=1, \ z=1\}$ and  $B_2=\{(x,y,z) \mid x^2+y^2-z^2=1,  \ z=-1\}$.
We can parametrize $B_1$ by $\gamma(t)=(\sqrt 2\cos t,\sqrt 2\sin t,1)$, $t\in [0,2\pi]$. Then $T=(-\sin t,\cos t,0)$ and $T'=-(\cos t, \sin t,0)$. Now what is $\eta(t)$? For fixed $t$ consider the curve $\alpha_t(s)=(s\cos t,s\sin t,\sqrt{s^2-1})$. Then it geometrically clear that $\alpha_t$ is a curve on $M$ which runs towards $B_1$ and  intersects $B_1$ orthogonally at $s=\sqrt2$ so we should have $\eta(t)=\frac{-1}{\sqrt3}(\cos t,\sin t,\sqrt 2)$ (which  also can be checked more rigorously e.g. by using polar coordinates near $B_1$). Hence
$$\int_{ B_1}k_g\ ds=\int_0^{2\pi}\langle T',\eta\rangle \ dt=\int_0^{2\pi}\frac 1{\sqrt 3} \ dt=\frac{2\pi}{\sqrt 3}$$
In a similar way or using symmetry
$\int_{ B_2}k_g\ ds=\frac{2\pi}{\sqrt 3}$ so we have $\int_{\partial \bar M}k_g\ ds=\frac{4\pi}{\sqrt 3}$ and hence
$$\int_{ M} K\;dA=-\frac{4\pi}{\sqrt 3}$$
