'Set time format'

@format.setter
def format(self, format):

    if (format not in self.FORMATS):
        raise ValueError(u'format    must    be    one    of    {0}'.format(list(self.FORMATS)))
    format_cls = self.FORMATS[format]
    if hasattr(format_cls, u'subfmts'):
        subfmt_names = [subfmt[0] for subfmt in format_cls.subfmts]
        if (self.out_subfmt not in subfmt_names):
            self.out_subfmt = u'*'
    self._time = format_cls(self._time.jd1, self._time.jd2, self._time._scale, self.precision, in_subfmt=self.in_subfmt, out_subfmt=self.out_subfmt, from_jd=True)
    self._format = format
