Sets the time in a given {@link TimePicker}.

@param timePicker the {@code TimePicker} object.
@param hour the hour e.g. 15
@param minute the minute e.g. 30
165595
public void setTimePicker(final TimePicker timePicker, final int hour, final int minute) {
		if(timePicker != null){
			Activity activity = activityUtils.getCurrentActivity(false);
			if(activity != null){
				activity.runOnUiThread(new Runnable()
				{
					public void run()
					{
						try{
							timePicker.setCurrentHour(hour);
							timePicker.setCurrentMinute(minute);
						}catch (Exception ignored){}
					}
				});
			}
		}
	}
668298
def set_dimmer_start_time(self, hour, minute):
        
        #  This is to calculate the difference between local time
        #  and the time in the gateway
        d1 = self._gateway.get_gateway_info().current_time
        d2 = dt.utcnow()
        diff = d1 - d2
        newtime = dt(100, 1, 1, hour, minute, 00) - diff

        command = {
            ATTR_SMART_TASK_TRIGGER_TIME_INTERVAL:
                [{
                    ATTR_SMART_TASK_TRIGGER_TIME_START_HOUR: newtime.hour,
                    ATTR_SMART_TASK_TRIGGER_TIME_START_MIN: newtime.minute
                }]
            }
        return self._task.set_values(command)
374172
public void setTimeFormat(java.text.DateFormat timeFormat) {
        this.timeFormat = timeFormat;
        // update our pre-built timePickerDialog with the new timeFormat:
        initTimePickerDialog(getContext());

        // save the flags and selection first:
        final PickerSpinnerAdapter adapter = ((PickerSpinnerAdapter)getAdapter());
        final boolean moreTimeItems = isShowingMoreTimeItems();
        final boolean numbersInView = adapter.isShowingSecondaryTextInView();
        final Calendar selection = getSelectedTime();
        // we need to restore differently if we have a temporary selection:
        final boolean temporarySelected = getSelectedItemPosition() == adapter.getCount();

        // to rebuild the spinner items, we need to recreate our adapter:
        initAdapter(getContext());

        // force restore flags and selection to the new Adapter:
        setShowNumbersInView(numbersInView);
        this.showMoreTimeItems = false;
        if(temporarySelected) {
            // for some reason these calls have to be exactly in this order!
            setSelectedTime(selection.get(Calendar.HOUR_OF_DAY), selection.get(Calendar.MINUTE));
            setShowMoreTimeItems(moreTimeItems);
        } else {
            // this way it works when a date from the array is selected (like the default)
            setShowMoreTimeItems(moreTimeItems);
            setSelectedTime(selection.get(Calendar.HOUR_OF_DAY), selection.get(Calendar.MINUTE));
        }
    }
1148142
public void setMorphTime(float time) {
		int p = (int) time;
		int n = p + 1;
		float offset = time - p;
		
		p = rational(p);
		n = rational(n);
		
		setFrame(p, n, offset);
	}
360195
public static function timePicker($field, $title, $value = '', $type = TimePicker::TYPE_TIME)
    {
        return (new TimePicker($field, $title, $value))->type($type);
    }
616473
public function setTime($hour, $minute, $second = 0)
        {
            parent::setTime($hour, $minute, $second);

            return $this;
        }
1122343
public void setTimeInMillis(long millis) {
        // If we don't need to recalculate the calendar field values,
        // do nothing.
// BEGIN Android-changed: Removed ZoneInfo support
//        if (time == millis && isTimeSet && areFieldsSet && areAllFieldsSet
//            && (zone instanceof ZoneInfo) && !((ZoneInfo)zone).isDirty()) {
        if (time == millis && isTimeSet && areFieldsSet && areAllFieldsSet) {
// END Android-changed: Removed ZoneInfo support

            return;
        }
        time = millis;
        isTimeSet = true;
        areFieldsSet = false;
        computeFields();
        areAllFieldsSet = areFieldsSet = true;
    }
948311
function Timepicker() {
        this.debug = true; // Change this to true to start debugging
        this._curInst = null; // The current instance in use
        this._disabledInputs = []; // List of time picker inputs that have been disabled
        this._timepickerShowing = false; // True if the popup picker is showing , false if not
        this._inDialog = false; // True if showing within a "dialog", false if not
        this._dialogClass = 'ui-timepicker-dialog'; // The name of the dialog marker class
        this._mainDivId = 'ui-timepicker-div'; // The ID of the main timepicker division
        this._inlineClass = 'ui-timepicker-inline'; // The name of the inline marker class
        this._currentClass = 'ui-timepicker-current'; // The name of the current hour / minutes marker class
        this._dayOverClass = 'ui-timepicker-days-cell-over'; // The name of the day hover marker class

        this.regional = []; // Available regional settings, indexed by language code
        this.regional[''] = { // Default regional settings
            hourText: 'Hour',           // Display text for hours section
            minuteText: 'Minute',       // Display text for minutes link
            amPmText: ['AM', 'PM'],     // Display text for AM PM
            closeButtonText: 'Done',        // Text for the confirmation button (ok button)
            nowButtonText: 'Now',           // Text for the now button
            deselectButtonText: 'Deselect'  // Text for the deselect button
        };
        this._defaults = { // Global defaults for all the time picker instances
            showOn: 'focus',    // 'focus' for popup on focus,
                                // 'button' for trigger button, or 'both' for either (not yet implemented)
            button: null,                   // 'button' element that will trigger the timepicker
            showAnim: 'fadeIn',             // Name of jQuery animation for popup
            showOptions: {},                // Options for enhanced animations
            appendText: '',                 // Display text following the input box, e.g. showing the format

            beforeShow: null,               // Define a callback function executed before the timepicker is shown
            onSelect: null,                 // Define a callback function when a hour / minutes is selected
            onClose: null,                  // Define a callback function when the timepicker is closed

            timeSeparator: ':',             // The character to use to separate hours and minutes.
            periodSeparator: ' ',           // The character to use to separate the time from the time period.
            showPeriod: false,              // Define whether or not to show AM/PM with selected time
            showPeriodLabels: true,         // Show the AM/PM labels on the left of the time picker
            showLeadingZero: true,          // Define whether or not to show a leading zero for hours < 10. [true/false]
            showMinutesLeadingZero: true,   // Define whether or not to show a leading zero for minutes < 10.
            altField: '',                   // Selector for an alternate field to store selected time into
            defaultTime: 'now',             // Used as default time when input field is empty or for inline timePicker
                                            // (set to 'now' for the current time, '' for no highlighted time)
            myPosition: 'left top',         // Position of the dialog relative to the input.
                                            // see the position utility for more info : http://jqueryui.com/demos/position/
            atPosition: 'left bottom',      // Position of the input element to match
                                            // Note : if the position utility is not loaded, the timepicker will attach left top to left bottom
            //NEW: 2011-02-03
            onHourShow: null,			    // callback for enabling / disabling on selectable hours  ex : function(hour) { return true; }
            onMinuteShow: null,             // callback for enabling / disabling on time selection  ex : function(hour,minute) { return true; }

            hours: {
                starts: 0,                  // first displayed hour
                ends: 23                    // last displayed hour
            },
            minutes: {
                starts: 0,                  // first displayed minute
                ends: 55,                   // last displayed minute
                interval: 5,                // interval of displayed minutes
                manual: []                  // optional extra manual entries for minutes
            },
            rows: 4,                        // number of rows for the input tables, minimum 2, makes more sense if you use multiple of 2
            // 2011-08-05 0.2.4
            showHours: true,                // display the hours section of the dialog
            showMinutes: true,              // display the minute section of the dialog
            optionalMinutes: false,         // optionally parse inputs of whole hours with minutes omitted

            // buttons
            showCloseButton: false,         // shows an OK button to confirm the edit
            showNowButton: false,           // Shows the 'now' button
            showDeselectButton: false,       // Shows the deselect time button

            maxTime: {
                hour: null,
                minute: null
            },
            minTime: {
                hour: null,
                minute: null
            }

        };
        $.extend(this._defaults, this.regional['']);

        this.tpDiv = $('<div id="' + this._mainDivId + '" class="ui-timepicker ui-widget ui-helper-clearfix ui-corner-all " style="display: none"></div>');
    }
366088
public static void setMinTime(int mintime) {
    System.setProperty(MIN_TIME, String.valueOf(mintime));
    TimerTrace.mintime = mintime;
  }
924923
public void setTime(long time) {
        super.setTime((time/1000)*1000);
        nanos = (int)((time%1000) * 1000000);
        if (nanos < 0) {
            nanos = 1000000000 + nanos;
            super.setTime(((time/1000)-1)*1000);
        }
    }
1225795
public void setTime(String timeString)
    {
		Date time = null;
		try	{
            if ((timeString != null) && (timeString.length() > 0))
                time = timeFormat.parse(timeString);
		} catch (Exception e)	{
            time = null;
		}
        this.setTime(time);
    }
224058
public void setTime(Date time)
    {
        String timeString = "";
        if (time != null)
    		timeString = timeFormat.format(time);
        jTextField3.setText(timeString);
        jTimeButton1.setTargetDate(time);
    }
1237491
public void setTimexValue(String v) {
    if (Timex3_Type.featOkTst && ((Timex3_Type)jcasType).casFeat_timexValue == null)
      jcasType.jcas.throwFeatMissing("timexValue", "de.unihd.dbs.uima.types.heideltime.Timex3");
    jcasType.ll_cas.ll_setStringValue(addr, ((Timex3_Type)jcasType).casFeatCode_timexValue, v);}
772392
@Override public void updateTime(final ZonedDateTime TIME) {
        if (dateText.isVisible()) {
            dateText.setText(dateTextFormatter.format(TIME));
            Helper.adjustTextSize(dateText, 0.6 * size, size * 0.08);
            dateText.relocate((size - dateText.getLayoutBounds().getWidth()) * 0.5, size * 0.22180451);
        }
        if (dateNumbers.isVisible()) {
            dateNumbers.setText(dateNumberFormatter.format(TIME));
            Helper.adjustTextSize(dateNumbers, 0.6 * size, size * 0.08);
            dateNumbers.relocate((size -dateNumbers.getLayoutBounds().getWidth()) * 0.5, size * 0.68984962);
        }

        hour.setText(HOUR_FORMATTER.format(TIME));
        Helper.adjustTextSize(hour, 0.4 * size, 0.328 * size);
        hour.relocate(0.136 * size, (size - hour.getLayoutBounds().getHeight()) * 0.5);

        minute.setText(MINUTE_FORMATTER.format(TIME));
        Helper.adjustTextSize(minute, 0.4 * size, 0.328 * size);
        minute.relocate(0.544 * size, (size - minute.getLayoutBounds().getHeight()) * 0.5);

        if (secondBackgroundCircle.isVisible()) {
            secondArc.setLength((-6 * TIME.getSecond()));
            if (clock.isDiscreteSeconds()) {
                secondArc.setLength((-6 * TIME.getSecond()));
            } else {
                secondArc.setLength((-6 * TIME.getSecond() -TIME.get(ChronoField.MILLI_OF_SECOND) * 0.006));
            }
        }
    }
750422
function (event) {
            var inst = $.timepicker._getInst(event.target);
            var handled = true;
            inst._keyEvent = true;
            if ($.timepicker._timepickerShowing) {
                switch (event.keyCode) {
                    case 9: $.timepicker._hideTimepicker();
                        handled = false;
                        break; // hide on tab out
                    case 13:
                        $.timepicker._updateSelectedValue(inst);
                        $.timepicker._hideTimepicker();

                        return false; // don't submit the form
                        break; // select the value on enter
                    case 27: $.timepicker._hideTimepicker();
                        break; // hide on escape
                    default: handled = false;
                }
            }
            else if (event.keyCode == 36 && event.ctrlKey) { // display the time picker on ctrl+home
                $.timepicker._showTimepicker(this);
            }
            else {
                handled = false;
            }
            if (handled) {
                event.preventDefault();
                event.stopPropagation();
            }
        }
283675
function Time(hour, minute, second, microsecond) {
        if (_i18n_locale.locale_name == 'en_DEBUG') {
            this.hour = 11;
            this.minute = 22;
            this.second = 33;
            this.microsecond = 123000;
        } else {
            this.hour = hour;
            this.minute = minute;
            this.second = second;
            this.microsecond = microsecond ? microsecond : 0;
        }
    }
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);
    }