Set timezone.
@param s time zone.
507989
public void setTimeZone(final String s) {
      if (s == null) {
          calendar = Calendar.getInstance();
      } else {
        calendar = Calendar.getInstance(TimeZone.getTimeZone(s));
      }
  }
260384
public static void setTime(Datebox datebox, Timebox timebox, Date value) {
        value = value == null ? new Date() : value;
        datebox.setValue(DateUtil.stripTime(value));
        timebox.setValue(value);
    }
366685
public static function setTimeZone($timezone) {
		if (self::_validateTimezone($timezone)) {
			self::$_timezone = $timezone;
			return TRUE;
		}
		return FALSE;
	}
693103
public LocalTime toLocalTime(String s) throws SQLException {
    if (s == null) {
      return null;
    }

    if (s.equals("24:00:00")) {
      return LocalTime.MAX;
    }

    try {
      return LocalTime.parse(s);
    } catch (DateTimeParseException nfe) {
      throw new PSQLException(
          GT.tr("Bad value for type timestamp/date/time: {1}", s),
          PSQLState.BAD_DATETIME_FORMAT, nfe);
    }

  }
225971
def timezone(self, value):
        """"""
        self._timezone = (value if isinstance(value, datetime.tzinfo)
                          else tz.gettz(value))
15824
public function setDefault($timeZone): void
    {
        if (is_string($timeZone) || $timeZone instanceof DateTimeZone) {
            $timeZone = $this->getTimeZone($timeZone);
        }
        $this->timeZoneClass->setDefault($timeZone);
        self::$defaultTz = $timeZone;
    }
592212
public TimeZoneFormat setTimeZoneNames(TimeZoneNames tznames) {
        if (isFrozen()) {
            throw new UnsupportedOperationException("Attempt to modify frozen object");
        }
       _tznames = tznames;
       // TimeZoneGenericNames must be changed to utilize the new TimeZoneNames instance.
       _gnames = new TimeZoneGenericNames(_locale, _tznames);
       return this;
    }
1292564
public static void setUtc(String time) {
		Instant instant = Instant.parse(time);
		setClock(Clock.fixed(instant, ZoneId.of("UTC")));
	}
940908
public final void setItsDate(final Date pItsDate) {
    if (pItsDate == null) {
      this.itsDate = null;
    } else {
      this.itsDate = new Date(pItsDate.getTime());
    }
  }
954000
public void updateTimeZone(String timeZone) throws SecurityException {
	checkWriteAccess();
	boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_SETTING);
	if (!hasAccess) throw new SecurityException("no access to update regional setting");

	Element regional = _getRootElement("regional");
	regional.setAttribute("timezone", timeZone.trim());

    }
172650
public void setMillis(long millis)
    {
        ZonedDateTime zonedDateTime = ZonedDateTime.ofInstant(Instant.ofEpochMilli(millis), ZoneOffset.UTC);
        set(zonedDateTime);
    }
892310
public final void setDate(final Date date) {
        this.date = date;
        if (date instanceof DateTime) {
            if (Value.DATE.equals(getParameter(Parameter.VALUE))) {
                getParameters().replace(Value.DATE_TIME);
            }
            updateTimeZone(((DateTime) date).getTimeZone());
        } else {
            if (date != null) {
                getParameters().replace(Value.DATE);
            }
            /*
            else {
                getParameters().removeAll(Parameter.VALUE);
            }
            */
            // ensure timezone is null for VALUE=DATE or null properties..
            updateTimeZone(null);
        }
    }
744
public function setTimeZone(\DateTimeZone $timeZone = null)
    {
        if ($timeZone) {
            $value = $timeZone->getName();
        } else {
            $value = null;
        }

        $this->setValue('timezone', $value);
    }
662090
public static void initTimezones(final String serverUrl) throws TimezonesException {
    try {
      if (tzs == null) {
        tzs = (Timezones)Class.forName("org.bedework.util.timezones.TimezonesImpl").newInstance();
      }

      tzs.init(serverUrl);
    } catch (final TimezonesException te) {
      throw te;
    } catch (final Throwable t) {
      throw new TimezonesException(t);
    }
  }
986764
public void setTimeZone(TimeZone zone)
    {
        // zone is cloned once for all three usages below:
        TimeZone zoneToSet = (TimeZone)zone.clone();
        if (fDateFormat != null) {
            fDateFormat.setTimeZone(zoneToSet);
        }
        // fDateFormat has the master calendar for the DateIntervalFormat;
        // fFromCalendar and fToCalendar are internal work clones of that calendar.
        if (fFromCalendar != null) {
            fFromCalendar.setTimeZone(zoneToSet);
        }
        if (fToCalendar != null) {
            fToCalendar.setTimeZone(zoneToSet);
        }
    }
1225262
static public long getDateTime(String s, String format, TimeZone tz)
    {
        long ret = 0L;
        SimpleDateFormat df = null;

        try
        {
            if(s != null && s.length() > 0)
            {
                df = formatPool.getFormat(format);
                df.setTimeZone(tz);
                Date dt = df.parse(s);
                ret = dt.getTime();
            }
        }
        catch(Exception e)
        {
        }

        if(df != null)
            formatPool.release(df);

        return ret;
    }
547687
public function setTimezone($tz)
    {
        if (!$tz instanceof \DateTimeZone) {
            $tz = new \DateTimeZone($tz);
        }

        $this->tz = $tz;

        return parent::setTimezone($tz);
    }