Set I{created}.
        @param dt: The created date & time.
            Set as datetime.utc() when I{None}.
        @type dt: L{datetime}
557613
def setcreated(self, dt=None):
        
        if dt is None:
            self.created = Token.utc()
        else:
            self.created = dt
717824
private void setCreatedAtFromDefinition(@Nullable Long createdAt) {
    if (createdAt != null && createdAt > definition.getCreatedAt()) {
      setCreatedAt(createdAt);
    }
  }
506621
public final void setTimeZone(final TimeZone timeZone) {
        for (final Period period : this) {
            period.setTimeZone(timeZone);
        }
        this.timezone = timeZone;
        this.utc = false;
    }
812230
public function setCreatedAtValue(\DateTime $createdAt = null)
    {
        if($createdAt==null && $this->createdAt == null){
            $this->createdAt = new \DateTime();
        }else if($createdAt instanceof \DateTime){
            $this->createdAt = $createdAt;
        }
    }
711113
def __set_date(self, value):
        '''
        
        '''
        value = date_to_datetime(value)
        if value > datetime.now() + timedelta(hours=14, minutes=1): #More or less 14 hours from now in case the submitted date was local
            raise ValueError("Date cannot be in the future.")

        if self.__due_date and value.date() > self.__due_date:
            raise ValueError("Date cannot be posterior to the due date.")

        self.__date = value
319635
public final void setDateSeen(final Date pDateSeen) {
    if (pDateSeen == null) {
      this.dateSeen = null;
    } else {
      this.dateSeen = new Date(pDateSeen.getTime());
    }
  }
104191
private void setDateTimeNow() {
        final Date dt = new Date();

        this.dateTime = MetaElement.DF_DATE.format(dt) +
                "T" + MetaElement.DF_TIME.format(dt);
    }
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);
	}
1195958
def convert_datetime_to_utc(dt: PotentialDatetimeType) -> DateTime:
    
    dt = coerce_to_pendulum(dt)
    tz = get_tz_utc()
    return dt.in_tz(tz)
526220
public void setDate(int year, int month, int day) {
        Calendar to = Calendar.getInstance();
        to.set(year, month, day);
        setDate(to);
    }
257656
public static Date getRoundedDay(Date dt) {
        Calendar cal = new GregorianCalendar();
        cal.setTime(dt);
        return new GregorianCalendar(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH))
                   .getTime();
    }
941030
def set_timestamp(self, timestamp=str(datetime.datetime.utcfromtimestamp(time.time()))):
        
        self.timestamp = timestamp
648594
public void setUtc(String utc) {
        if (utc == null) {
            this.utc = null;
        } else {
            if (utc.length() != 20) {
                throw new IllegalArgumentException("Must be of the form YYYYMMDDTHHMMSS.sssZ");
            }
        }
    }
739473
public void setMonth(int newMonth) {
		if (newMonth < 0 || newMonth == Integer.MIN_VALUE) {
			setMonth(0, true);
		} else if (newMonth > 11) {
			setMonth(11, true);
		} else {
			setMonth(newMonth, true);
		}
	}
1267688
public void setUserDateCreated(String userDateCreated) {

        try {
            m_userDateCreated = convertTimestamp(userDateCreated);
        } catch (Throwable e) {
            setThrowable(e);
        }
    }
796033
def set_dtreat_interpt(self, t=None):
        
        if t is not None:
            t = np.unique(np.asarray(t, dtype=float).ravel())
        self._dtreat['interp-t'] = t
89364
def _try_assign_utc_time(self, raw_time, time_base):
        """"""

        # Check if the raw time is encoded UTC since y2k or just uptime
        if raw_time != IOTileEvent.InvalidRawTime and (raw_time & (1 << 31)):
            y2k_offset = self.raw_time ^ (1 << 31)
            return self._Y2KReference + datetime.timedelta(seconds=y2k_offset)

        if time_base is not None:
            return time_base + datetime.timedelta(seconds=raw_time)

        return None