mirror of
https://github.com/ergochat/ergo.git
synced 2025-10-12 13:37:22 +02:00
fix CHATHISTORY TARGETS from MySQL backend using server local TZ (#2224)
time.Unix() returns a time.Time with the Location populated to the server's timezone. Such times will format incorrectly with IRCv3TimestampFormat unless they are manually converted to UTC.
This commit is contained in:
parent
aed216a62e
commit
4bcd008416
@ -961,7 +961,7 @@ func (mysql *MySQL) listCorrespondentsInternal(ctx context.Context, target strin
|
|||||||
}
|
}
|
||||||
results = append(results, history.TargetListing{
|
results = append(results, history.TargetListing{
|
||||||
CfName: correspondent,
|
CfName: correspondent,
|
||||||
Time: time.Unix(0, nanotime),
|
Time: time.Unix(0, nanotime).UTC(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1014,7 +1014,7 @@ func (mysql *MySQL) ListChannels(cfchannels []string) (results []history.TargetL
|
|||||||
}
|
}
|
||||||
results = append(results, history.TargetListing{
|
results = append(results, history.TargetListing{
|
||||||
CfName: target,
|
CfName: target,
|
||||||
Time: time.Unix(0, nanotime),
|
Time: time.Unix(0, nanotime).UTC(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user