moov-io / iso8583-connection

:satellite: Go-powered ISO8583 connection handler offering advanced binary framing, message interleaving, and a robust connection pool for load distribution and seamless reconnections.
Apache License 2.0
62 stars 22 forks source link

invalid format for DefaultTransmissionDateTimeFormat const #36

Closed jerome-laforge closed 1 year ago

jerome-laforge commented 1 year ago

The constant DefaultTransmissionDateTimeFormat has an invalid format https://github.com/moov-io/iso8583-connection/blob/cc16efa1ef07b3059395cf6a01d47613556bab93/connection.go#L23

This patch fixes it

Index: connection.go
===================================================================
diff --git a/connection.go b/connection.go
--- a/connection.go (revision cc16efa1ef07b3059395cf6a01d47613556bab93)
+++ b/connection.go (date 1681109924553)
@@ -20,7 +20,7 @@
    ErrSendTimeout      = errors.New("message send timeout")
 )

-const DefaultTransmissionDateTimeFormat string = "0102150405" // YYMMDDhhmmss
+const DefaultTransmissionDateTimeFormat string = "060102150405" // YYMMDDhhmmss

 // MessageLengthReader reads message header from the r and returns message length
 type MessageLengthReader func(r io.Reader) (int, error)
adamdecaf commented 1 year ago

Thanks for catching this. Can you open a pull request @jerome-laforge?

jerome-laforge commented 1 year ago

Sure, @adamdecaf please find https://github.com/moov-io/iso8583-connection/pull/37

Thanks for your support