Uhrzeit in der UTC-Zeitzone (ohne Schaltsekunde)
187157
private PlainTime getTimeUTC() {

        int timeOfDay = getTimeOfDay(this);
        int minutes = timeOfDay / 60;
        int hour = minutes / 60;
        int minute = minutes % 60;
        int second = timeOfDay % 60;
        int nano = this.getNanosecond();

        return PlainTime.of(hour, minute, second, nano);

    }
1009379
def _generate_timezone(date, local_tz):
    
    offset = _calculate_offset(date, local_tz)

    hour = abs(offset) // 3600
    minute = abs(offset) % 3600 // 60

    if offset < 0:
        return '%c%02d:%02d' % ("-", hour, minute)
    else:
        return '%c%02d:%02d' % ("+", hour, minute)
1122674
def utcoffset(self, dt):
        """"""
        tt = _localtime(_mktime((dt.year, dt.month, dt.day,
                 dt.hour, dt.minute, dt.second, dt.weekday(), 0, -1)))
        if tt.tm_isdst > 0: return _dstoffset
        return _stdoffset
72612
def _analemma_suns(self):
        
        for h in xrange(0, 24):
            if self._analemma_position(h) < 0:
                continue
            elif self._analemma_position(h) == 0:
                chours = []
                # this is an hour that not all the hours are day or night
                prevhour = self.latitude <= 0
                num_of_days = 8760 if not self.is_leap_year else 8760 + 24
                for hoy in xrange(h, num_of_days, 24):
                    thishour = self.calculate_sun_from_hoy(hoy).is_during_day
                    if thishour != prevhour:
                        if not thishour:
                            hoy -= 24
                        dt = DateTime.from_hoy(hoy, self.is_leap_year)
                        chours.append((dt.month, dt.day, dt.hour))
                    prevhour = thishour
                tt = []
                for hcount in range(int(len(chours) / 2)):
                    st = chours[2 * hcount]
                    en = chours[2 * hcount + 1]
                    if self.latitude >= 0:
                        tt = [self.calculate_sun(*st)] + \
                            [self.calculate_sun(st[0], d, h)
                             for d in xrange(st[1] + 1, 29, 7)] + \
                            [self.calculate_sun(m, d, h)
                             for m in xrange(st[0] + 1, en[0])
                             for d in xrange(3, 29, 7)] + \
                            [self.calculate_sun(en[0], d, h)
                             for d in xrange(3, en[1], 7)] + \
                            [self.calculate_sun(*en)]
                    else:
                        tt = [self.calculate_sun(*en)] + \
                            [self.calculate_sun(en[0], d, h)
                             for d in xrange(en[1] + 1, 29, 7)] + \
                            [self.calculate_sun(m, d, h) for m in xrange(en[0] +
                                                                         1, 13)
                             for d in xrange(3, 29, 7)] + \
                            [self.calculate_sun(m, d, h) for m in xrange(1, st[0])
                             for d in xrange(3, 29, 7)] + \
                            [self.calculate_sun(st[0], d, h)
                             for d in xrange(3, st[1], 7)] + \
                            [self.calculate_sun(*st)]
                    yield tt
            else:
                yield tuple(self.calculate_sun((m % 12) + 1, d, h)
                            for m in xrange(0, 13) for d in (7, 14, 21))[:-2]
760001
@Override
    public final D transform(long utcDays) {

        long s1 = this.winterOnOrBefore(utcDays);
        long s2 = this.winterOnOrBefore(s1 + 370);
        long m12 = this.newMoonOnOrAfter(s1 + 1);
        long nextM11 = this.newMoonBefore(s2 + 1);
        long m = this.newMoonBefore(utcDays + 1);
        boolean leapYearInSui = (lunations(m12, nextM11) == 12);

        long me = lunations(m12, m); // might be negative

        if (leapYearInSui && this.hasLeapMonth(m12, m)) {
            me--;
        }

        int month = (int) Math.floorMod(me, 12);

        if (month == 0) {
            month = 12;
        }

        long elapsedYears =
            (long) Math.floor(1.5 - (month / 12.0) + ((utcDays - EPOCH_CHINESE) / MEAN_TROPICAL_YEAR));

        int cycle = (int) Math.floorDiv(elapsedYears - 1, 60) + 1;
        int yearOfCycle = (int) Math.floorMod(elapsedYears, 60);

        if (yearOfCycle == 0) {
            yearOfCycle = 60;
        }

        int dayOfMonth = (int) (utcDays - m + 1);
        EastAsianMonth eam = EastAsianMonth.valueOf(month);

        if (leapYearInSui && this.hasNoMajorSolarTerm(m) && !this.hasLeapMonth(m12, this.newMoonBefore(m))) {
            eam = eam.withLeap();
        }

        return this.create(cycle, yearOfCycle, eam, dayOfMonth, utcDays);

    }
1029322
protected function setZero()
	{
	    if (false === $this->boolAllowReset)
	    {
	        return ;
	    }
	    $intCID = preg_replace('@\D@', '', \Input::get('zid')); //  only digits 
	    if ($intCID>0) 
	    {
	        // mal sehen ob ein Startdatum gesetzt war
    	    $objVisitorsDate = \Database::getInstance()
    	            ->prepare("SELECT 
                                    visitors_startdate 
                                FROM 
                                    tl_visitors 
                                WHERE 
                                    id=?")
                    ->execute($intCID);
    	    $objVisitorsDate->next();
    	    if (0 < (int)$objVisitorsDate->visitors_startdate) 
    	    {
    	        // ok es war eins gesetzt, dann setzen wir es wieder
                \Database::getInstance()
                        ->prepare("UPDATE tl_visitors 
                                    SET 
                                        tstamp=?, 
                                        visitors_startdate=? 
                                    WHERE 
                                        id=?")
                        ->execute( time(), strtotime(date('Y-m-d')), $intCID );
    	    }
    	    // und nun die eigendlichen counter
    	    \Database::getInstance()
    	            ->prepare("DELETE FROM tl_visitors_counter WHERE vid=?")
                    ->execute($intCID);
            \Database::getInstance()
                    ->prepare("DELETE FROM tl_visitors_blocker WHERE vid=?")
                    ->execute($intCID);
            \Database::getInstance()
                    ->prepare("DELETE FROM tl_visitors_browser WHERE vid=?")
                    ->execute($intCID);
            \Database::getInstance()
                    ->prepare("DELETE FROM tl_visitors_pages WHERE vid=?")
                    ->execute($intCID);
            \Database::getInstance()
                    ->prepare("DELETE FROM tl_visitors_screen_counter WHERE vid=?")
                    ->execute($intCID);
	    }
	    return ;
	}
1258703
public static void setUtc(Date time) {
		setClock(Clock.fixed(time.toInstant(), ZoneId.of("UTC")));
	}
683727
protected static String utcNow() {

    Calendar calendar = Calendar.getInstance();
    SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US);
    dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
    return dateFormat.format(calendar.getTime());
    // return java.time.format.DateTimeFormatter.RFC_1123_DATE_TIME.format(
    //    ZonedDateTime.now(ZoneOffset.UTC));
  }
219276
public function UTCTimeZoneOffset() : int
    {
        $originDateTime = new \DateTime('now', $this);

        $utcTimeZone = new \DateTimeZone('UTC');
        $utcDateTime = new \DateTime('now', $utcTimeZone);

        return $utcTimeZone->getOffset($utcDateTime) - $this->getOffset($originDateTime);
    }
737465
function toAmzUtcString(date) {
  var pieces = new Date(date).toUTCString().match(/^(.+), (.+) (.+) (.+) (.+) GMT$/)
  return [pieces[1], pieces[3], pieces[2], pieces[5], 'UTC', pieces[4]].join(' ')
}
262428
function utcOffset(tt) {
      if (this == ICAL.Timezone.utcTimezone || this == ICAL.Timezone.localTimezone) {
        return 0;
      }

      this._ensureCoverage(tt.year);

      if (!this.changes.length) {
        return 0;
      }

      var tt_change = {
        year: tt.year,
        month: tt.month,
        day: tt.day,
        hour: tt.hour,
        minute: tt.minute,
        second: tt.second
      };

      var change_num = this._findNearbyChange(tt_change);
      var change_num_to_use = -1;
      var step = 1;

      // TODO: replace with bin search?
      for (;;) {
        var change = ICAL.helpers.clone(this.changes[change_num], true);
        if (change.utcOffset < change.prevUtcOffset) {
          ICAL.Timezone.adjust_change(change, 0, 0, 0, change.utcOffset);
        } else {
          ICAL.Timezone.adjust_change(change, 0, 0, 0,
                                          change.prevUtcOffset);
        }

        var cmp = ICAL.Timezone._compare_change_fn(tt_change, change);

        if (cmp >= 0) {
          change_num_to_use = change_num;
        } else {
          step = -1;
        }

        if (step == -1 && change_num_to_use != -1) {
          break;
        }

        change_num += step;

        if (change_num < 0) {
          return 0;
        }

        if (change_num >= this.changes.length) {
          break;
        }
      }

      var zone_change = this.changes[change_num_to_use];
      var utcOffset_change = zone_change.utcOffset - zone_change.prevUtcOffset;

      if (utcOffset_change < 0 && change_num_to_use > 0) {
        var tmp_change = ICAL.helpers.clone(zone_change, true);
        ICAL.Timezone.adjust_change(tmp_change, 0, 0, 0,
                                        tmp_change.prevUtcOffset);

        if (ICAL.Timezone._compare_change_fn(tt_change, tmp_change) < 0) {
          var prev_zone_change = this.changes[change_num_to_use - 1];

          var want_daylight = false; // TODO

          if (zone_change.is_daylight != want_daylight &&
              prev_zone_change.is_daylight == want_daylight) {
            zone_change = prev_zone_change;
          }
        }
      }

      // TODO return is_daylight?
      return zone_change.utcOffset;
    }
23850
def utc_book_close_time(self):
        
        tz = pytz.timezone(self.timezone)
        close_time = datetime.datetime.strptime(self.close_time, '%H:%M:%S').time()
        close_time = tz.localize(datetime.datetime.combine(datetime.datetime.now(tz), close_time))
        return close_time.astimezone(pytz.utc).time()
239379
def sun_ra_dec(utc_time):
    
    jdate = jdays2000(utc_time) / 36525.0
    eps = np.deg2rad(23.0 + 26.0 / 60.0 + 21.448 / 3600.0 -
                     (46.8150 * jdate + 0.00059 * jdate * jdate -
                      0.001813 * jdate * jdate * jdate) / 3600)
    eclon = sun_ecliptic_longitude(utc_time)
    x__ = np.cos(eclon)
    y__ = np.cos(eps) * np.sin(eclon)
    z__ = np.sin(eps) * np.sin(eclon)
    r__ = np.sqrt(1.0 - z__ * z__)
    # sun declination
    declination = np.arctan2(z__, r__)
    # right ascension
    right_ascension = 2 * np.arctan2(y__, (x__ + r__))
    return right_ascension, declination
667062
static Replacement handleNonDaylightSavingsZone(
      boolean inJodaTimeContext, String daylightSavingsZone, String fixedOffset) {
    if (inJodaTimeContext) {
      String newDescription =
          SUMMARY
              + "\n\n"
              + observesDaylightSavingsMessage("DateTimeZone", daylightSavingsZone, fixedOffset);
      return new Replacement(newDescription, ImmutableList.of(daylightSavingsZone, fixedOffset));
    } else {
      String newDescription =
          SUMMARY
              + "\n\n"
              + "This TimeZone will not observe daylight savings. "
              + "If this is intended, use "
              + fixedOffset
              + " instead; to observe daylight savings, use "
              + daylightSavingsZone
              + ".";
      return new Replacement(newDescription, ImmutableList.of(fixedOffset, daylightSavingsZone));
    }
  }
736522
private void calculateSplit(long localTime)
  {
    _localTimeOfEpoch = localTime;
    _dayOfEpoch = divFloor(_localTimeOfEpoch, MS_PER_DAY);
    _timeOfDay = _localTimeOfEpoch - MS_PER_DAY * _dayOfEpoch;

    calculateYear();
    calculateMonth();

    _hour = _timeOfDay / 3600000;
    _minute = _timeOfDay / 60000 % 60;
    _second = _timeOfDay / 1000 % 60;
    _ms = _timeOfDay % 1000;

    if (_timeZone == _gmtTimeZone) {
      _isDaylightTime = false;
      _zoneName = _stdName;
      _zoneOffset = 0;
    }
    else {
      // server/1470
      long tempOffset = _timeZone.getOffset(_localTimeOfEpoch);
      _zoneOffset = _timeZone.getOffset(_localTimeOfEpoch - tempOffset);

      if (_zoneOffset == _timeZone.getRawOffset()) {
        _isDaylightTime = false;
        _zoneName = _stdName;
      }
      else {
        _isDaylightTime = true;
        _zoneName = _dstName;
      }
    }

    _calendar.setTimeInMillis(_localTimeOfEpoch);
  }
963403
def to_utc(some_time):
    

    # Convert timezone aware objects to UTC
    if some_time.tzinfo and some_time.utcoffset():
        some_time = some_time.astimezone(tzutc())

    # Now that time is UTC, simply remove the timezone component.
    return some_time.replace(tzinfo=None)
147973
def getUTC(self, utcoffset):
        
        newTime = (self.value - utcoffset.value) % 24
        return Time(newTime)