海拔图和小地图

This commit is contained in:
lishuo committed 2021-03-30 17:29:40 +08:00
1 parent 42fa59d103
commit 8ad36c965d
521 files changed
+1985033 -439

No files matched your search

@@ -0,0 +1,33 @@
/************************************************/
/* */
/* Copyright (c) 2018 - 2021 monitor1394 */
/* https://github.com/monitor1394 */
/* */
/************************************************/
using System;
using UnityEngine;
namespace XCharts
{
public static class DateTimeUtil
{
private static readonly DateTime k_DateTime1970 = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
public static int GetTimestamp()
{
return (int)(DateTime.Now - k_DateTime1970).TotalSeconds;
}
public static int GetTimestamp(DateTime time)
{
return (int)(time - k_DateTime1970).TotalSeconds;
}
public static DateTime GetDateTime(int timestamp)
{
long span = ((long)timestamp) * 10000000;
return k_DateTime1970.Add(new TimeSpan(span));
}
}
}