From 6ffd6b272e48ebe1e723aeb9dddd82e9d3b3edc0 Mon Sep 17 00:00:00 2001 From: Shlomi Noach Date: Thu, 13 Oct 2016 13:14:31 +0200 Subject: [PATCH] row_event: returning native time.Time value on decodeTimestamp; removed legacy comments --- .../siddontang/go-mysql/replication/row_event.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/vendor/github.com/siddontang/go-mysql/replication/row_event.go b/vendor/github.com/siddontang/go-mysql/replication/row_event.go index 9d377af..9506b1e 100644 --- a/vendor/github.com/siddontang/go-mysql/replication/row_event.go +++ b/vendor/github.com/siddontang/go-mysql/replication/row_event.go @@ -609,12 +609,8 @@ func decodeTimestamp2(data []byte, dec uint16) (interface{}, int, error) { return "0000-00-00 00:00:00", n, nil } - // t := time.Unix(sec, usec*1000).UTC() // .UTC() converted by shlomi-noach - // return t.Format(TimeFormat), n, nil - //t := time.Unix(sec, usec*1000).UTC() t := time.Unix(sec, usec*1000) - return t.Format(TimeFormat), n, nil - //return t, n, nil + return t, n, nil } const DATETIMEF_INT_OFS int64 = 0x8000000000 @@ -661,10 +657,6 @@ func decodeDatetime2(data []byte, dec uint16) (interface{}, int, error) { minute := int((hms >> 6) % (1 << 6)) hour := int((hms >> 12)) - // t := time.Date(year, time.Month(month), day, hour, minute, second, 0, time.UTC) // added by Shlomi Noach - //return t.Format(TimeFormat), n, nil // added by Shlomi Noach - // return t, n, nil // added by Shlomi Noach - return fmt.Sprintf("%04d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, minute, second), n, nil // commented by Shlomi Noach. Yes I know about `git blame` }