(375481a35) Write save times as unix time values and display them using the system's current date format
This commit is contained in:
@@ -43,9 +43,9 @@ namespace Barotrauma
|
||||
private static readonly DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the current Unix Epoch
|
||||
/// Returns the current Unix Epoch (Coordinated Universal Time )
|
||||
/// </summary>
|
||||
public static int Now
|
||||
public static int NowUTC
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -53,6 +53,17 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the current Unix Epoch (user's current time)
|
||||
/// </summary>
|
||||
public static int NowLocal
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)(DateTime.Now.Subtract(epoch).TotalSeconds);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert an epoch to a datetime
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user