Skip to content

Commit 87a1287

Browse files
committed
fixed seq format
1 parent 5e2564b commit 87a1287

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rtq/rtq.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@ func messageHandler(db *bolt.DB, mq chan Message, remove chan int) {
231231
b := tx.Bucket([]byte("mq"))
232232
id, _ := b.NextSequence()
233233

234-
msg.Seq = fmt.Sprintf("%d%d%d%012d", msg.Time.Year(), msg.Time.Month(), msg.Time.Day(), id)
234+
df := msg.Time.Format("20060102")
235+
236+
msg.Seq = fmt.Sprintf("%s%012d", df, id)
235237

236238
buf, err := json.Marshal(msg)
237239
if err != nil {

0 commit comments

Comments
 (0)