func (tm TimeWrapper) MarshalJSON() ([]byte, error) {
	_, err := tm.Time.MarshalJSON()
	if err != nil {
		return nil, err
	}
	if tm.timeStr != "" {
		return json.Marshal(tm.timeStr)
	}
	return json.Marshal(tm.FormatToString())
}
MarshalJSON implements the json.Marshaler interface.
The time is a quoted string in RFC 3339 format, with sub-second precision added if present.
In case of zero sub-second precision presence, trailing zeros are included.
package util
import (
	"encoding/json"
	"time"
)
type TimeWrapper struct {
	time.Time
	timeStr string
}
type TimeWithTrailingZeroMsec = TimeWrapper
func NewTime(t time.Time) *TimeWrapper {
	return &TimeWrapper{Time: t}
}
func NewTimeWithTrailingZeroMsec(t time.Time, _ int) *TimeWrapper {
	return &TimeWrapper{
		Time: t,
	}
}