23 using System.Globalization;
25 namespace Ntp.Analyzer.Objects
36 var adjusted =
new DateTime(
37 lastActive.Year, lastActive.Month, lastActive.Day,
38 lastActive.Hour, lastActive.Minute, lastActive.Second,
41 LastActive = adjusted.AddMinutes(zone);
48 LastActive = lastActive;
51 public string Name => Id.ToString(CultureInfo.InvariantCulture);
57 public DateTime LastActive {
get;
set; }
59 public bool Hide {
get; }
61 public bool IsActive => !Hide;
67 switch (LastActive.Kind)
69 case DateTimeKind.Utc:
70 case DateTimeKind.Unspecified:
72 case DateTimeKind.Local:
73 return Convert.ToInt32(TimeZoneInfo.Local.GetUtcOffset(DateTime.UtcNow).TotalMinutes);
PeerActivity(Peer peer, Host host, DateTime lastActive)
PeerActivity(int id, Peer peer, Host host, DateTime lastActive, int zone, bool hide)