Skip to content

Commit 348fc22

Browse files
authored
Update RELEASE_NOTES.md
1 parent 741dfb5 commit 348fc22

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

RELEASE_NOTES.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
This version support reading and writing [Timestamp values](https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type).
66
Packer and unpacker interfaces added pack/unpackTimestamp methods.
77

8-
Timestamp value in MessagePack is an extension type value whose code is -1. If MessgageUnapcker.unpackValue method is used,
9-
TimestampValue object can be retrieved automatically. If you are using low-level unpack methods (e.g., unpackInt, unpackExtension, etc.),
10-
you need to read unpackExtensionHeader first, and if extHeader.isTimestampType is true, call unpackTimestamp(ext).
8+
Timestamp value in MessagePack is an extension type value whose code is -1. You can read TimestampValue object with MessgageUnapcker.unpackValue method.
9+
If you are using low-level unpack methods (e.g., unpackInt, unpackExtension, etc.),
10+
you need to read unpackExtensionHeader first, and if extHeader.isTimestampType() is true, call unpackTimestamp(extHeader).
1111

12-
When reading Timestamp values, [java.time.Instant](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/Instant.html) will be returned.
13-
You can extract the unixtime with Instant.getEpochSecond(), unixtime with milliseconds resolution with Instant.toEpochMilli(), and nano-resolution time with Instant.getNano().
14-
15-
As TimestampValue is a sub class of ExtensionValue, your code traversing MessagePack data with MessageUnpacker.unpackValue should require no change.
12+
Timestamp values are represented with [java.time.Instant](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/Instant.html) objects.
13+
You can extract the unixtime value with Instant.getEpochSecond(), unixtime with milliseconds resolution with Instant.toEpochMilli(), and nano-resolution time with Instant.getNano().
1614

15+
As TimestampValue is just a sub class of ExtensionValue, no change requierd in your code that are traversing MessagePack data with MessageUnpacker.unpackValue method.
1716

1817
* Added Timestamp support [#565](http://github.com/msgpack/msgpack-java/pull/565) and low-level APIs [#580](https://github.com/msgpack/msgpack-java/pull/580) for
1918
reading timestamp values.

0 commit comments

Comments
 (0)