public static DateTime?GetLastUpdateDate(this EnvironmentV2.ISystemInfo self) { if (self.lastUpdateDate == null) { return(null); } return(DateTimeV2.NewDateTimeFromUnixTimestamp(self.lastUpdateDate.Value)); }
/// <summary> If available will process and broadcast the received server date </summary> /// <param name="utcString"> e.g. "Sun, 08 Mar 2020 09:47:52 GMT" </param> private static void ProcessServerDate(Uri uri, string utcString) { DateTime?serverUtcDate = null; try { if (!utcString.IsNullOrEmpty()) { serverUtcDate = DateTimeV2.ParseUtc(utcString); } } catch (Exception e) { Log.w("Failed parsing server UTC date: " + e); } if (serverUtcDate.HasValue) { EventBus.instance.Publish(DateTimeV2.SERVER_UTC_DATE, uri, serverUtcDate.Value); } }
public static DateTime GetLatestLaunchDate(this EnvironmentV2.ISystemInfo self) { return(DateTimeV2.NewDateTimeFromUnixTimestamp(self.latestLaunchDate)); }