Registers timestamp converters (Date -> String -> java.sql.Timestamp) for specified model attributes.
18027
void timestampFormat(DateFormat format, String... attributes) {
        convertWith(new DateToStringConverter(format), attributes);
        convertWith(new StringToTimestampConverter(format), attributes);
    }
197964
public static Timestamp convertDateToTimestamp(Date date, Timestamp elseValue) {
        return Checker.isNull(date) ? elseValue : new Timestamp(date.getTime());
    }
4427
@Deprecated
    public void setTS(String name, java.util.Date date) {
        if(date == null) {
            set(name, null);
        } else {
            set(name, new java.sql.Timestamp(date.getTime()));
        }
    }
1167918
static BindTransform getSqlTransform(TypeName typeName) {
		if (Time.class.getName().equals(typeName.toString())) {
			return new SQLTimeBindTransform();
		}

		if (java.sql.Date.class.getName().equals(typeName.toString())) {
			return new SQLDateBindTransform();
		}

		return null;
	}
733343
public Query addTimestampParameter(java.util.Date date) {
        return addParameter(new Timestamp(date.getTime()));
    }
422587
public void setTimestampProperty(String pstrSection, String pstrProp, 
                    					Timestamp ptsVal, String pstrComments)
    {
        INISection objSec   = null;

        objSec = (INISection) this.mhmapSections.get(pstrSection);
        if (objSec == null)
        {
            objSec = new INISection(pstrSection);
            this.mhmapSections.put(pstrSection, objSec);
        }
        objSec.setProperty(pstrProp, timeToStr(ptsVal, this.mstrTimeStampFmt), 
                        	pstrComments);
    }
941030
def set_timestamp(self, timestamp=str(datetime.datetime.utcfromtimestamp(time.time()))):
        
        self.timestamp = timestamp
50936
public void add(long timestamp, T object) {
		JMMap.getOrPutGetNew(this.timeSeriesMap, buildKeyTimestamp(timestamp),
				ArrayList::new).add(object);
	}
183255
function ensureTimestamps(columns, allowSyncedAt) {
  var now = Date.now();
  if (!allowSyncedAt || !columns.syncedAt) {
    columns.syncedAt = now;
  }
  if (!columns.createdAt) {
    // Take the value from the client, if present:
    columns.createdAt = columns.updatedAt;
  }
}
445290
def with_timestamps(self, created_at=None, updated_at=None):
        
        if not created_at:
            created_at = self.created_at()

        if not updated_at:
            updated_at = self.updated_at()

        return self.with_pivot(created_at, updated_at)
399039
def _set_timestamps_on_attach(self, record, exists=False):
        
        fresh = self._parent.fresh_timestamp()

        if not exists and self._has_pivot_column(self.created_at()):
            record[self.created_at()] = fresh

        if self._has_pivot_column(self.updated_at()):
            record[self.updated_at()] = fresh

        return record
691220
private void applyAutoTimestamp(PropertyMetadata propertyMetadata, long millis) {
    Object timestamp = null;
    Class<?> fieldType = propertyMetadata.getDeclaredType();
    if (Date.class.equals(fieldType)) {
      timestamp = new Date(millis);
    } else if (Calendar.class.equals(fieldType)) {
      Calendar calendar = new Calendar.Builder().setInstant(millis).build();
      timestamp = calendar;
    } else if (Long.class.equals(fieldType) || long.class.equals(fieldType)) {
      timestamp = millis;
    } else if (OffsetDateTime.class.equals(fieldType)) {
      timestamp = OffsetDateTime.ofInstant(Instant.ofEpochMilli(millis), ZoneId.systemDefault());
    } else if (ZonedDateTime.class.equals(fieldType)) {
      timestamp = ZonedDateTime.ofInstant(Instant.ofEpochMilli(millis), ZoneId.systemDefault());
    }
    ValueBuilder<?, ?, ?> valueBuilder = propertyMetadata.getMapper().toDatastore(timestamp);
    valueBuilder.setExcludeFromIndexes(!propertyMetadata.isIndexed());
    entityBuilder.set(propertyMetadata.getMappedName(), valueBuilder.build());
  }
773532
@Override
    public void setTimestamp(String parameterName, Timestamp x) throws SQLException
    {
        checkClosed();
        throw SQLError.noSupport();
    }
427185
def timestamping_validate(data, schema):
    
    jsonschema.validate(data, schema)
    data['timestamp'] = str(time.time())
263385
def update_timestampable_model(sender, instance, *args, **kwargs):
    '''
    
    '''
    if not isinstance(instance, TimestampableModel):
        return
    if not instance.pk:
        instance.created_at = now()
    instance.updated_at = now()
16799
private void validateAutoTimestampField(PropertyMetadata propertyMetadata) {
    Class<?> dataClass = propertyMetadata.getDeclaredType();
    if (Collections.binarySearch(VALID_TIMESTAMP_TYPES, dataClass.getName()) < 0) {
      String messageFormat = "Field %s in class %s must be one of the following types - %s";
      throw new EntityManagerException(String.format(messageFormat,
          propertyMetadata.getField().getName(), entityClass, VALID_TIMESTAMP_TYPES));
    }
  }
1247023
private boolean isTypeTimestampConvertible(final Field field) {
        return dataTypes.entrySet().stream()
                .anyMatch(e -> e.getValue().equals("TIMESTAMP") && e.getKey().equals(field.getType()));
    }