code: func (tw *TimeWrapper) UnmarshalText(data []byte) error {
  	var formatted bool
  	// Check for RFC string (KDBX 3.1), if it fail try with KDBX 4
  	t, err := time.Parse(time.RFC3339, string(data))
  	if err != nil {
  		// KDBX v4
  		// In version 4 the time is a base64 timestamp of seconds passed since 1/1/0001
  		var buf int64
  
  		decoded := make([]byte, base64.StdEncoding.DecodedLen(len(data)))
  		_, err = base64.StdEncoding.Decode(decoded, data)
  		if err != nil {
  			return err
  		}
  		if err := binary.Read(bytes.NewReader(decoded), binary.LittleEndian, &buf); err != nil {
  			return err
  		}
  
  		// Count since year 0
  		t = time.Date(0, 1, 1, 0, 0, 0, 0, time.UTC)
  		for {
  			if buf < intLimit {
  				t = t.Add(time.Duration(buf) * time.Second)
  				break
  			} else {
  				t = t.Add(time.Duration(intLimit) * time.Second)
  				buf -= intLimit
  			}
  		}
  		formatted = false
  	} else {
  		formatted = true
  	}
  	*tw = TimeWrapper{
  		Formatted: formatted,
  		Time:      t,
  	}
  	return nil
  }
docs: // UnmarshalText take a string of format time.RFC3339 and marshals it into the TimeWrapper value (Kdbx v3.1)
  // On Kdbx v4 it calculates the time with given seconds via data byte array (base64 encoded)