Returns true if this object looks like it holds TimeZoneInfo, otherwise false.
170299
private boolean isTimeZone(JsonObject root) {
    for (String key : TIMEZONE_KEYS) {
      if (root.has(key)) {
        return true;
      }
    }
    return false;
  }
1311746
def is_time_valid(self, timestamp):
        
        if self.is_time_day_valid(timestamp):
            for timerange in self.timeranges:
                if timerange.is_time_valid(timestamp):
                    return True
        return False
1362928
private boolean isOK(TimeSpan timeSpan) {
	return res.exists() && (res.lastModified() + timeSpan.getMillis() >= System.currentTimeMillis());
    }
1294246
def ensure_utc(time, tz='UTC'):
    
    if not time.tzinfo:
        time = time.replace(tzinfo=pytz.timezone(tz))
    return time.replace(tzinfo=pytz.utc)
225971
def timezone(self, value):
        """"""
        self._timezone = (value if isinstance(value, datetime.tzinfo)
                          else tz.gettz(value))
115836
def _get_timezone(self, root):
        """"""
        tz_str = root.xpath('//div[@class="smallfont" and @align="center"]')[0].text
        hours = int(self._tz_re.search(tz_str).group(1))
        return tzoffset(tz_str, hours * 60)
323629
public function contains(TimezonedDateTime $timezonedDateTime) : bool
    {
        return $this->start->comesBeforeOrEqual($timezonedDateTime) && $this->end->comesAfterOrEqual($timezonedDateTime);
    }
476167
def asDatetime(self, tzinfo=None):
        
        if tzinfo is None:
            tzinfo = FixedOffset(0, 0)

        if not self.isTimezoneDependent():
            return self._time.replace(tzinfo=tzinfo)
        else:
            return self._time.replace(tzinfo=FixedOffset(0, 0)).astimezone(tzinfo)
1075138
def has(self, key, mtime=None):
        
        v = self.__values.get(key, None)
        if not v:
            return False
        if self.check_modified_time:
            mtime = self._get_mtime(key, mtime)
            if mtime != self.__modified_times[key]:
                del self[key]
                return False
        return True
1085226
def utcoffset(self):
        """"""
        if self._tzinfo is None:
            return None
        offset = self._tzinfo.utcoffset(None)
        _check_utc_offset("utcoffset", offset)
        return offset
1255465
private boolean isTypedTimeFullyLegal() {
        if (mIs24HourMode) {
            // For 24-hour mode, the time is legal if the hours and minutes are each legal. Note:
            // getEnteredTime() will ONLY call isTypedTimeFullyLegal() when NOT in 24hour mode.
            int[] values = getEnteredTime(null);
            return (values[0] >= 0 && values[1] >= 0 && values[1] < 60);
        } else {
            // For AM/PM mode, the time is legal if it contains an AM or PM, as those can only be
            // legally added at specific times based on the tree's algorithm.
            return (mTypedTimes.contains(getAmOrPmKeyCode(AM)) ||
                    mTypedTimes.contains(getAmOrPmKeyCode(PM)));
        }
    }
1231037
public static function setTimeZone($timezone)
    {
        if (self::_validateTimezone($timezone)) {
            self::$timezone = $timezone;
            return true;
        }
        return false;
    }
821212
def ensure_timezone(dateTime,timeZone=None):
    '''
    
    '''

    if is_aware(dateTime) and not getattr(settings,'USE_TZ',False):
        return make_naive(dateTime,timezone=timeZone)
    if is_naive(dateTime) and getattr(settings,'USE_TZ',False):
        return make_aware(dateTime,timezone=timeZone)
    # If neither condition is met, then we can return what was passed
    return dateTime
95057
public boolean hasNoTime(Statement o) {	 
        if (o instanceof HasTime) return false;
        if (o instanceof Activity) return false;
        return true;
        /* OLD Definition
         return (o instanceof WasDerivedFrom) 
        	 || (o instanceof ActedOnBehalfOf)
                 || (o instanceof WasInformedBy)
                 || (o instanceof WasAttributedTo)
                 || (o instanceof WasAssociatedWith)
                 || (o instanceof WasInfluencedBy)
                 || (o instanceof SpecializationOf)
                 || (o instanceof AlternateOf)
                 || (o instanceof MentionOf)
                 || (o instanceof HadMember);
         */
    }
563980
def tz(self):
        """"""

        if self.timezone is None:
            return None

        try:
            tz = pytz.timezone(self.timezone)
            return tz
        except pytz.UnknownTimeZoneError:
            raise AstralError("Unknown timezone '%s'" % self.timezone)
1103210
synchronized TimeData getCurrentTime(boolean withZone) {

        resetCurrentTimestamp();

        if (withZone) {
            if (currentTime == null) {
                int seconds =
                    (int) (HsqlDateTime.getNormalisedTime(currentMillis))
                    / 1000;
                int nanos = (int) (currentMillis % 1000) * 1000000;

                currentTime = new TimeData(seconds, nanos, timeZoneSeconds);
            }

            return currentTime;
        } else {
            if (localTime == null) {
                int seconds =
                    (int) (HsqlDateTime.getNormalisedTime(
                        currentMillis + +timeZoneSeconds * 1000)) / 1000;
                int nanos = (int) (currentMillis % 1000) * 1000000;

                localTime = new TimeData(seconds, nanos, 0);
            }

            return localTime;
        }
    }
524677
def is_time(self):
        """"""
        dt = DATA_TYPES['time']
        if type(self.data) is dt['type'] and ':' in str(self.data) and str(self.data).count(':') == 2:
            # Separate hour, month, second
            date_split = str(self.data).split(':')
            h, m, s = date_split[0], date_split[1], date_split[2]

            # Validate values
            valid_hour, valid_min, valid_sec = int(h) in HOURS, int(m) in MINUTES, int(float(s)) in SECONDS

            if all(i is True for i in (valid_hour, valid_min, valid_sec)):
                self.type = 'time'.upper()
                self.len = None
                return True