get_date_offset = function (date) {
              var offset = -date.getTimezoneOffset();
              return (offset !== null ? offset : 0);
          }
Gets the offset in minutes from UTC for a certain date.
@param {Date} date
@returns {Number}