Skip to content

Commit

Permalink
解析雪花Id时,时间字段输出毫秒
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed May 6, 2024
1 parent 1d83f11 commit a4e47b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions XCoder/CrazyCoder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
<PackageReference Include="Microsoft.VisualBasic" Version="10.3.0" />
<PackageReference Include="NewLife.Core">
<Version>10.10.2024.426-beta1001</Version>
<Version>10.10.2024.501</Version>
</PackageReference>
<PackageReference Include="NewLife.MQTT">
<Version>2.0.2024.407</Version>
Expand All @@ -88,7 +88,7 @@
<Version>2.9.2024.426-beta1008</Version>
</PackageReference>
<PackageReference Include="NewLife.XCode">
<Version>11.11.2024.424-beta1026</Version>
<Version>11.12.2024.503</Version>
</PackageReference>
<PackageReference Include="SSH.NET">
<Version>2024.0.0</Version>
Expand Down
2 changes: 1 addition & 1 deletion XCoder/Tools/FrmSecurity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ private void btnSnowflake_Click(Object sender, EventArgs e)
$"十六:{v:X16}",
$"编码:{(t << 2):X8} {workerId:X2} {sequence:X3}",
$"基准:{snow.StartTimestamp.ToFullString()} {snow.StartTimestamp.Kind}",
$"时间:{time.ToFullString()} {time.Kind} ({t} / {(t << 22):X8})",
$"时间:{time:yyyy-MM-dd HH:mm:ss.fff} {time.Kind} ({t} / {(t << 22):X8})",
$"节点:{workerId} ({workerId:X4})",
$"序号:{sequence} ({sequence:X4})",
$"本机:{snow.WorkerId} ({snow.WorkerId:X4})");
Expand Down
4 changes: 2 additions & 2 deletions XCoderLinux/XCoderLinux.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@

<ItemGroup>
<PackageReference Include="GtkSharp" Version="3.24.24.95" />
<PackageReference Include="NewLife.Core" Version="10.10.2024.426-beta1001" />
<PackageReference Include="NewLife.Core" Version="10.10.2024.501" />
<PackageReference Include="NewLife.Remoting" Version="2.8.2024.426-beta1006" />
<PackageReference Include="NewLife.XCode" Version="11.11.2024.424-beta1026" />
<PackageReference Include="NewLife.XCode" Version="11.12.2024.503" />
<PackageReference Include="System.IO.Ports" Version="8.0.0" />
<PackageReference Include="System.Management" Version="8.0.0" />
</ItemGroup>
Expand Down

0 comments on commit a4e47b8

Please sign in to comment.