You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* MessagePack timestamp type support. This includes interoperability with DateTime/DateTimeOffset as well as MsgPack.Timespan type with basic arithmatics, properties, and conversions.
716
717
717
718
BUG FIXES
718
719
* Fix ByteArrayPacker throws IndexOutOfBoundException when the buffer remaining bytes is equal to packed scalar size. #252
<ItemGroupCondition="'$(TargetFramework)' == 'net45' or '$(TargetFramework)' == 'net46' or '$(TargetFramework)' == 'netstandard1.1' or '$(TargetFramework)' == 'netstandard1.3' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'uap10.0' or '$(TargetFramework)' == 'MonoAndroid10' or '$(TargetFramework)' == 'Xamarin.iOS10'">
Copy file name to clipboardExpand all lines: src/MsgPack/Serialization/DateTimeConversionMethod.cs
+22-4Lines changed: 22 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -31,16 +31,34 @@ public enum DateTimeConversionMethod
31
31
/// Uses <see cref="DateTime.Ticks"/> context, that is, Gregorian 0000-01-01 based, 100 nano seconds resolution. This value also preserves <see cref="DateTimeKind"/>.
32
32
/// </summary>
33
33
/// <remarks>
34
-
/// As of 0.6, this value has been become default. This option prevents accidental data loss.
34
+
/// As of 0.6 to 0.9, this value became default. This option prevents accidental data loss.
35
35
/// </remarks>
36
36
Native=0,
37
37
38
38
/// <summary>
39
39
/// Uses Unix epoc context, that is, Gregirian 1970-01-01 based, milliseconds resolution.
40
40
/// </summary>
41
41
/// <remarks>
42
-
/// Many binding such as Java uses this resolution, so this option gives maximom interoperability.
42
+
/// Many binding such as Java uses this resolution, so this option gives maximum interoperability.
43
43
/// </remarks>
44
-
UnixEpoc=1
44
+
UnixEpoc=1,
45
+
46
+
/// <summary>
47
+
/// Uses MsgPack timestamp format, that is, Gregirian 1970-01-01 based, nanoseconds resolution, with reserved ext type format.
48
+
/// </summary>
49
+
/// <remarks>
50
+
/// <para>
51
+
/// As of 1.0, this value became default.
52
+
/// </para>
53
+
/// <para>
54
+
/// This is best choice for interoperability and prevents accidental data loss, but old implementation does not recognize this type.
55
+
/// For backward compability purposes, use <see cref="Native"/> or <see cref="UnixEpoc"/> instead.
56
+
/// </para>
57
+
/// <para>
58
+
/// Note that <see cref="DateTime"/> and <see cref="DateTimeOffset"/> cannot hold nanoseconds value.
59
+
/// If you can depend on this assembly, consider <see cref="Timestamp"/> for date-time typed members to maximize interoperability for other languages.
Copy file name to clipboardExpand all lines: src/MsgPack/Serialization/DefaultSerializers/DateTimeOffsetMessagePackSerializer.cs
+17-5Lines changed: 17 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
//
3
3
// MessagePack for CLI
4
4
//
5
-
// Copyright (C) 2015-2016 FUJIWARA, Yusuke
5
+
// Copyright (C) 2015-2017 FUJIWARA, Yusuke
6
6
//
7
7
// Licensed under the Apache License, Version 2.0 (the "License");
8
8
// you may not use this file except in compliance with the License.
@@ -52,7 +52,11 @@ public DateTimeOffsetMessagePackSerializer( SerializationContext ownerContext, D
52
52
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design","CA1062:ValidateArgumentsOfPublicMethods",MessageId="0",Justification="Validated by caller in base class")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design","CA1062:ValidateArgumentsOfPublicMethods",MessageId="0",Justification="Validated by caller in base class")]
0 commit comments