Browse Source

Fix the expiration time display problem in the dashboard due to time zone issues (#820)

master
xiangxiren 3 years ago
committed by GitHub
parent
commit
0bc7a214bf
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/DotNetCore.CAP/Internal/Helper.cs

+ 2
- 1
src/DotNetCore.CAP/Internal/Helper.cs View File

@@ -9,7 +9,8 @@ namespace DotNetCore.CAP.Internal
{ {
public static class Helper public static class Helper
{ {
private static readonly DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Local);
private static readonly DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Local)
.AddHours(TimeZoneInfo.Local.BaseUtcOffset.Hours);


public static long ToTimestamp(DateTime value) public static long ToTimestamp(DateTime value)
{ {


Loading…
Cancel
Save