xiazcy commented on code in PR #3090:
URL: https://github.com/apache/tinkerpop/pull/3090#discussion_r2038347946


##########
gremlin-go/driver/graphBinary.go:
##########
@@ -509,6 +510,39 @@ func timeWriter(value interface{}, buffer *bytes.Buffer, _ 
*graphBinaryTypeSeria
        return buffer.Bytes(), nil
 }
 
+func offsetDateTimeWriter(value interface{}, buffer *bytes.Buffer, _ 
*graphBinaryTypeSerializer) ([]byte, error) {
+       t := value.(time.Time)
+       err := binary.Write(buffer, binary.BigEndian, int32(t.Year()))
+       if err != nil {
+               return nil, err
+       }
+
+       err = binary.Write(buffer, binary.BigEndian, byte(t.Month()))
+       if err != nil {
+               return nil, err
+       }
+       err = binary.Write(buffer, binary.BigEndian, byte(t.Day()))
+       if err != nil {
+               return nil, err
+       }
+       // construct time of day in nanoseconds
+       h := t.Hour()

Review Comment:
   Hmmm technically all date methods return/accept `int`, so that will remain 
an issue for 32 bit system regardless, but I can make it `int64` to make the 
problem a bit less. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to