Adds and optionally formats the timestamp to the provided map under the provided field name,
if it's should be included.
186167
public MapBuilder addTimestamp(String fieldName, boolean include, long timestamp) {
        if (include && timestamp > 0) {
            map.put(getFieldName(fieldName), timestampFormatter.format(timestamp));
        }
        return this;
    }
314077
protected void appendField(final StringBuilder builder, final String key, final LocalDateTime value) {
        appendField(builder, key, DATE_TIME_FORMAT.format(value));
    }
633668
function timestamp(schema, options) {
	options = options || {};
	// Set defaults
	options = Object.assign({
		createdName: 'createdAt',
		updatedName: 'updatedAt',
		disableCreated: false,
		disableUpdated: false
	}, options);

	// Add fields if not disabled
	if (!options.disableCreated) {
		addSchemaField(schema, options.createdName, {type: Date});
	}
	if (!options.disableUpdated) {
		addSchemaField(schema, options.updatedName, {type: Date});
	}

	// Add pre-save hook to save dates of creation and modification
	schema.pre('save', preSave);

	/**
	 * Callback for the schema pre save
	 *
	 * @this mongoose.Schema
	 * @param {Function} next The next pre save callback in chain
	 * @returns {undefined}
	 */
	function preSave(next) {
		const _ref = this.get(options.createdName);

		if (!options.disableUpdated) {
			this[options.updatedName] = new Date();
		}
		if (!options.disableCreated && (_ref === undefined || _ref === null)) {
			this[options.createdName] = new Date();
		}

		next();
	}
}
91024
public void addValueToIn(Object value, String name, Map<String, Object> map) {
        getMapHelper().addValueToIn(value, name, map);
    }
746934
public void addColumn(ByteBuffer name, ByteBuffer value, long timestamp) throws IOException
    {
        addColumn(new BufferCell(metadata.comparator.cellFromByteBuffer(name), value, timestamp));
    }
163608
public void writeTimestamp(Timestamp timestamp) throws IOException {
		_writeArrayFieldNameIfNeeded();
		_verifyValueWrite("write timestamp");
		_buffer.putByte(_typeMarker, BsonConstants.TYPE_TIMESTAMP);
		_buffer.putInt(timestamp.getInc());
		_buffer.putInt(timestamp.getTime());
		flushBuffer();
	}
714226
def format_datetime(cls, timestamp):
        
        if not timestamp:
            raise DateTimeFormatterException('timestamp must a valid string {}'.format(timestamp))

        return timestamp.strftime(cls.DATETIME_FORMAT)
1220315
public void putField(String key, Date value) {
        this.fields.put(key, BoxDateFormat.format(value));
    }
689597
private static void putField(ESIndice esIndice,Map<Integer,IndiceHeader> indiceHeaders,int position,StringBuilder token,SimpleDateFormat format){
		IndiceHeader indiceHeader = indiceHeaders.get(position);
		if(indiceHeader.getHeaderName().equals("health")) {
			esIndice.setHealth(token.toString());
			token.setLength(0);
		}
		else if(indiceHeader.getHeaderName().equals("status")) {
			esIndice.setStatus(token.toString());
			token.setLength(0);
		}
		else if(indiceHeader.getHeaderName().equals("index")) {
			esIndice.setIndex(token.toString());
			putGendate(  esIndice,  format);
			token.setLength(0);
		}
		else if(indiceHeader.getHeaderName().equals("uuid")) {
			esIndice.setUuid(token.toString());
			token.setLength(0);
		}
		else if(indiceHeader.getHeaderName().equals("pri")) {
			esIndice.setPri(Integer.parseInt(token.toString()));
			token.setLength(0);
		}
		else if(indiceHeader.getHeaderName().equals("rep")) {
			esIndice.setRep(Integer.parseInt(token.toString()));
			token.setLength(0);
		}
		else if(indiceHeader.getHeaderName().equals("docs.count")) {
			esIndice.setDocsCcount(Long.parseLong(token.toString()));
			token.setLength(0);
		}
		else if(indiceHeader.getHeaderName().equals("docs.deleted")) {
			esIndice.setDocsDeleted(Long.parseLong(token.toString()));
			token.setLength(0);
		}
		else if(indiceHeader.getHeaderName().equals("store.size")) {
			esIndice.setStoreSize(token.toString());
			token.setLength(0);
		}
		else if(indiceHeader.getHeaderName().equals("pri.store.size")) {
			esIndice.setPriStoreSize(token.toString());
			token.setLength(0);
		}
		else{
			esIndice.addOtherData(indiceHeader.getHeaderName(),token.toString());
			token.setLength(0);
		}


	}
1014129
def formatFieldValue( value, type, options = nil )
      if value and type
         case type
            when "date"
               value = formatDate( value )
            when "date / time","timestamp"
               value = formatDate( value, "%m-%d-%Y %I:%M %p" )
            when "timeofday"
               value = formatTimeOfDay( value, options )
            when "duration"
               value = formatDuration( value, options )
            when "currency"   
               value = formatCurrency( value, options )
            when "percent"   
               value = formatPercent( value, options )
         end
      end
      value
   end
409270
public PactDslJsonArray timestamp(String format, Instant example) {
      DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format);
      body.put(formatter.format(example));
      matchers.addRule(rootPath + appendArrayIndex(0), matchTimestamp(format));
      return this;
    }
624813
def add_to_map(map_obj, lat, lon, date_time, key, cluster_obj):
        """"""
        text = "Event {0} at {1}".format(key, date_time.split()[1])
        folium.Marker([lat, lon], popup=text).add_to(cluster_obj)
1121612
public void timestamp(String name, ZonedDateTime value) {
		Counter counter = get(name, CounterType.Timestamp);
		counter.setTime(value != null ? value : ZonedDateTime.now(ZoneId.of("Z")));
		update();
	}
725635
public void addDateField(String name, long date) {
        String d = DateGenerator.formatDate(date);
        add(name, d);
    }
1080671
public void addDocument(String... fields){
        for (int i = 0; i < fields.length; i++) {
            final DataType type = schema.getType(i);
            String field = fields[i];
            final Map<String, Set<Integer>> stringSetMap = this.fields.get(i);
            if(type == DataType.DateYear){ // reformat field value for date year
                 field = field.split("-")[0];
            }
            Set<Integer> integers = stringSetMap.get(field);
            if(integers == null){
                integers = new TreeSet<>();
            }
            integers.add(docPosition);
            stringSetMap.put(field, integers);
        }
        docPosition++;
    }
986092
def _insert(self, name, value, timestamp, intervals, **kwargs):
    '''
    
    '''
    if self._value_type in QUOTE_TYPES and not QUOTE_MATCH.match(value):
      value = "'%s'"%(value)

    for interval,config in self._intervals.items():
      timestamps = self._normalize_timestamps(timestamp, intervals, config)
      for tstamp in timestamps:
        self._insert_data(name, value, tstamp, interval, config, **kwargs)
428280
private Timestamp convertFieldValueToTimestamp(final Field field,
                                                   final ExportContainer exportContainer) {
        if (field.getType().equals(LocalDateTime.class)) {
            return convertToTimestamp(parseDateTime(exportContainer.getExportValue()));
        } else if (field.getType().equals(LocalDate.class)) {
            return convertToTimestamp(parseDate(exportContainer.getExportValue()));
        } else if (field.getType().equals(LocalTime.class)) {
            return convertToTimestamp(parseTime(exportContainer.getExportValue()));
        } else if (field.getType().equals(Date.class)) {
            return convertToTimestamp(parseSimpleDateLong(exportContainer.getExportValue()));
        } else if (field.getType().equals(Timestamp.class)) {
            return Timestamp.valueOf(exportContainer.getExportValue());
        }
        return null;
    }