// CreateTimestampDirForKubeadm is a function that creates a temporary directory under /etc/kubernetes/tmp formatted with the current date
497128
func CreateTimestampDirForKubeadm(dirName string) (string, error) {
	tempDir := path.Join(KubernetesDir, TempDirForKubeadm)
	// creates target folder if not already exists
	if err := os.MkdirAll(tempDir, 0700); err != nil {
		return "", errors.Wrapf(err, "failed to create directory %q", tempDir)
	}

	timestampDirName := fmt.Sprintf("%s-%s", dirName, time.Now().Format("2006-01-02-15-04-05"))
	timestampDir := path.Join(tempDir, timestampDirName)
	if err := os.Mkdir(timestampDir, 0700); err != nil {
		return "", errors.Wrap(err, "could not create timestamp directory")
	}

	return timestampDir, nil
}
1361721
func (s *CreateCoreDefinitionVersionOutput) SetCreationTimestamp(v string) *CreateCoreDefinitionVersionOutput {
	s.CreationTimestamp = &v
	return s
}
21808
func CreateFromTimestamp(timestamp int64, location string) (*Carbon, error) {
	l, err := time.LoadLocation(location)
	if err != nil {
		return nil, err
	}
	t := NewCarbon(Now().In(l))
	t.SetTimestamp(timestamp)

	return t, nil
}
1073565
func (s *Cluster) SetCreateTimestamp(v time.Time) *Cluster {
	s.CreateTimestamp = &v
	return s
}
1167622
func (s *InitiateDocumentVersionUploadInput) SetContentCreatedTimestamp(v time.Time) *InitiateDocumentVersionUploadInput {
	s.ContentCreatedTimestamp = &v
	return s
}
1070380
func (s *CreateDeviceDefinitionOutput) SetCreationTimestamp(v string) *CreateDeviceDefinitionOutput {
	s.CreationTimestamp = &v
	return s
}
1025976
func (s *Comment) SetCreatedTimestamp(v time.Time) *Comment {
	s.CreatedTimestamp = &v
	return s
}
835356
func (s *GetDeviceDefinitionOutput) SetCreationTimestamp(v string) *GetDeviceDefinitionOutput {
	s.CreationTimestamp = &v
	return s
}
1159789
func (s *FolderMetadata) SetCreatedTimestamp(v time.Time) *FolderMetadata {
	s.CreatedTimestamp = &v
	return s
}
91198
func CreateUtcTimestamp() *timestamp.Timestamp {
	now := time.Now().UTC()
	secs := now.Unix()
	nanos := int32(now.UnixNano() - (secs * 1000000000))
	return &(timestamp.Timestamp{Seconds: secs, Nanos: nanos})
}
961586
func (_class HostCrashdumpClass) GetTimestamp(sessionID SessionRef, self HostCrashdumpRef) (_retval time.Time, _err error) {
	_method := "host_crashdump.get_timestamp"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertHostCrashdumpRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg)
	if _err != nil {
		return
	}
	_retval, _err = convertTimeToGo(_method + " -> ", _result.Value)
	return
}
380806
func (s *GroupInformation) SetCreationTimestamp(v string) *GroupInformation {
	s.CreationTimestamp = &v
	return s
}
1012667
func NewTimestampOracle(cfg *Config) (*TimestampOracle, error) {
	if cfg.SaveInterval <= 0 {
		cfg.SaveInterval = defaultSaveInterval
	}

	tso := &TimestampOracle{
		cfg:      cfg,
		isLeader: 0,
	}

	var err error
	tso.listener, err = net.Listen("tcp", cfg.Addr)
	if err != nil {
		return nil, errors.Trace(err)
	}

	if len(cfg.ZKAddr) == 0 {
		// no zookeeper, use a fake zk conn instead
		tso.zkConn = zkhelper.NewConn()
	} else {
		tso.zkConn, err = zkhelper.ConnectToZkWithTimeout(cfg.ZKAddr, zkTimeout)
		if err != nil {
			return nil, errors.Trace(err)
		}
	}

	tso.conns = map[net.Conn]struct{}{}

	return tso, nil
}
488031
func (s *CreateCoreDefinitionOutput) SetCreationTimestamp(v string) *CreateCoreDefinitionOutput {
	s.CreationTimestamp = &v
	return s
}
1230877
func (ed *Execution_Data) PurgeTimestamps() {
	if ed == nil {
		return
	}
	ed.Created = nil
	ed.Modified = nil
}
772680
func (s *KinesisStreamSourceDescription) SetDeliveryStartTimestamp(v time.Time) *KinesisStreamSourceDescription {
	s.DeliveryStartTimestamp = &v
	return s
}
1354848
func (p *Pod) CreationTime() (time.Time, error) {
	if !(p.isPrepared || p.isRunning() || p.IsAfterRun()) {
		return time.Time{}, nil
	}
	t, err := p.getModTime("pod-created")
	if err == nil {
		return t, nil
	}
	if !os.IsNotExist(err) {
		return t, err
	}
	// backwards compatibility with rkt before v1.20
	return p.getModTime("pod")
}