// Leave TAI64* values as is, do not convert to time.Time during unmarshal.
LeaveTAI64 bool
+ // Do not convert TAI to UTC.
+ LeaveTAI bool
+
// Store items offsets.
SaveOffsets bool
}
panic("float is unsupported")
case types.TAI64:
t := iter.TAI64()
- if ctx.opts != nil && ctx.opts.LeaveTAI64 {
- return t, nil
- } else {
- return toUTC(t.Time())
+ if ctx.opts != nil {
+ if ctx.opts.LeaveTAI64 {
+ return t, nil
+ }
+ if ctx.opts.LeaveTAI {
+ return t.Time(), nil
+ }
}
+ return toUTC(t.Time())
case types.TAI64N:
t := iter.TAI64N()
- if ctx.opts != nil && ctx.opts.LeaveTAI64 {
- return t, nil
- } else {
- return toUTC(t.Time())
+ if ctx.opts != nil {
+ if ctx.opts.LeaveTAI64 {
+ return t, nil
+ }
+ if ctx.opts.LeaveTAI {
+ return t.Time(), nil
+ }
}
+ return toUTC(t.Time())
case types.TAI64NA:
return iter.TAI64NA(), nil
case types.Bin: