- Timestamp:
- Feb 16, 2022, 1:45:09 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bridge.go
r781 r784 28 28 timestampStr := "*" 29 29 if r != nil { 30 timestampStr = fmt.Sprintf("timestamp=%s", r.Timestamp.UTC().Format(serverTimeLayout))30 timestampStr = fmt.Sprintf("timestamp=%s", formatServerTime(r.Timestamp)) 31 31 } 32 32 dc.SendMessage(&irc.Message{ -
trunk/db_sqlite.go
r781 r784 796 796 args := []interface{}{ 797 797 sql.Named("id", receipt.ID), 798 sql.Named("timestamp", receipt.Timestamp.UTC().Format(serverTimeLayout)),798 sql.Named("timestamp", formatServerTime(receipt.Timestamp)), 799 799 sql.Named("network", networkID), 800 800 sql.Named("target", receipt.Target), -
trunk/downstream.go
r783 r784 2331 2331 2332 2332 broadcastTags := tags.Copy() 2333 broadcastTags["time"] = irc.TagValue( time.Now().UTC().Format(serverTimeLayout))2333 broadcastTags["time"] = irc.TagValue(formatServerTime(time.Now())) 2334 2334 broadcastMsg := &irc.Message{ 2335 2335 Tags: broadcastTags, … … 2357 2357 if dc.caps["echo-message"] { 2358 2358 echoTags := tags.Copy() 2359 echoTags["time"] = irc.TagValue( time.Now().UTC().Format(serverTimeLayout))2359 echoTags["time"] = irc.TagValue(formatServerTime(time.Now())) 2360 2360 dc.SendMessage(&irc.Message{ 2361 2361 Tags: echoTags, … … 2389 2389 2390 2390 echoTags := tags.Copy() 2391 echoTags["time"] = irc.TagValue( time.Now().UTC().Format(serverTimeLayout))2391 echoTags["time"] = irc.TagValue(formatServerTime(time.Now())) 2392 2392 if uc.account != "" { 2393 2393 echoTags["account"] = irc.TagValue(uc.account) … … 2440 2440 2441 2441 echoTags := tags.Copy() 2442 echoTags["time"] = irc.TagValue( time.Now().UTC().Format(serverTimeLayout))2442 echoTags["time"] = irc.TagValue(formatServerTime(time.Now())) 2443 2443 if uc.account != "" { 2444 2444 echoTags["account"] = irc.TagValue(uc.account) … … 2737 2737 Prefix: dc.srv.prefix(), 2738 2738 Command: "CHATHISTORY", 2739 Params: []string{"TARGETS", target.Name, target.LatestMessage.UTC().Format(serverTimeLayout)},2739 Params: []string{"TARGETS", target.Name, formatServerTime(target.LatestMessage)}, 2740 2740 }) 2741 2741 } … … 2833 2833 timestampStr := "*" 2834 2834 if !r.Timestamp.IsZero() { 2835 timestampStr = fmt.Sprintf("timestamp=%s", r.Timestamp.UTC().Format(serverTimeLayout))2835 timestampStr = fmt.Sprintf("timestamp=%s", formatServerTime(r.Timestamp)) 2836 2836 } 2837 2837 uc.forEachDownstream(func(d *downstreamConn) { -
trunk/irc.go
r778 r784 31 31 // The server-time layout, as defined in the IRCv3 spec. 32 32 const serverTimeLayout = "2006-01-02T15:04:05.000Z" 33 34 func formatServerTime(t time.Time) string { 35 return t.UTC().Format(serverTimeLayout) 36 } 33 37 34 38 type userModes string -
trunk/msgstore_fs.go
r668 r784 381 381 msg := &irc.Message{ 382 382 Tags: map[string]irc.TagValue{ 383 "time": irc.TagValue( t.UTC().Format(serverTimeLayout)),383 "time": irc.TagValue(formatServerTime(t)), 384 384 }, 385 385 Prefix: prefix, -
trunk/upstream.go
r781 r784 446 446 447 447 if _, ok := msg.Tags["time"]; !ok { 448 msg.Tags["time"] = irc.TagValue( time.Now().UTC().Format(serverTimeLayout))448 msg.Tags["time"] = irc.TagValue(formatServerTime(time.Now())) 449 449 } 450 450
Note:
See TracChangeset
for help on using the changeset viewer.