Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The dubbo protostuff protocol serializes the bug of java.sql.Timestamp #3914

Closed
2 tasks done
fitzf opened this issue Apr 23, 2019 · 2 comments
Closed
2 tasks done

The dubbo protostuff protocol serializes the bug of java.sql.Timestamp #3914

fitzf opened this issue Apr 23, 2019 · 2 comments
Milestone

Comments

@fitzf
Copy link
Contributor

fitzf commented Apr 23, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: v2.7.1
  • Operating System version: OSX 10.14.4
  • Java version: 1.8.0_202

Steps to reproduce this issue

    @Test
    public void testSerializeTimestamp() throws IOException, ClassNotFoundException {
        Timestamp originTime = new Timestamp(System.currentTimeMillis());
        this.protostuffObjectOutput.writeObject(originTime);
        this.flushToInput();

        Timestamp serializedTime = protostuffObjectInput.readObject(Timestamp.class);
        assertThat(serializedTime, is(originTime));
    }

// output
java.lang.AssertionError: 
Expected: is <2019-04-23 19:01:37.31>
     but: was <1970-01-01 08:00:00.31>
Expected :is <2019-04-23 19:01:37.31>
Actual   :<1970-01-01 08:00:00.31>
fitzf added a commit to fitzf/dubbo that referenced this issue Apr 23, 2019
@fitzf
Copy link
Contributor Author

fitzf commented Apr 23, 2019

#3915

@fitzf
Copy link
Contributor Author

fitzf commented Apr 23, 2019

@CrazyHZM @kexianjun

vio-lin pushed a commit to vio-lin/incubator-dubbo that referenced this issue Apr 29, 2019
* fix: apache#3727

* style: code tidy up

* style: add apache license

* fix: apache#3914 protostuff serialize java.sql.Timestamp
@cvictory cvictory added this to the 2.7.2 milestone May 28, 2019
CrazyHZM pushed a commit that referenced this issue Jul 3, 2019
…n method for java.sql.Date #4384 (#4386)

* fix: #3727

* style: code tidy up

* style: add apache license

* fix: #3914 protostuff serialize java.sql.Timestamp

* fix: add SqlDateDelegate to fix protostuff custon serialize java.sql.Date

fix #4384
rolandhe pushed a commit to rolandhe/dubbo that referenced this issue Sep 9, 2019
…n method for java.sql.Date apache#4384 (apache#4386)

* fix: apache#3727

* style: code tidy up

* style: add apache license

* fix: apache#3914 protostuff serialize java.sql.Timestamp

* fix: add SqlDateDelegate to fix protostuff custon serialize java.sql.Date

fix apache#4384
rolandhe pushed a commit to rolandhe/dubbo that referenced this issue Sep 9, 2019
…n method for java.sql.Date apache#4384 (apache#4386)

* fix: apache#3727

* style: code tidy up

* style: add apache license

* fix: apache#3914 protostuff serialize java.sql.Timestamp

* fix: add SqlDateDelegate to fix protostuff custon serialize java.sql.Date

fix apache#4384
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants