You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.8 KiB
64 lines
1.8 KiB
using System;
|
|
|
|
using System.Text;
|
|
|
|
using Sog;
|
|
using Sog.Crypto;
|
|
|
|
namespace TestSog
|
|
{
|
|
public class Program
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
AppTime time = new AppTime();
|
|
|
|
AppTime.InitTimeZone();
|
|
time.UpdateTime();
|
|
long tnowSecond = time.GetTimeSecond();
|
|
DateTime t = AppTime.ConvertUnixTimeToDateTime(tnowSecond*1000);
|
|
|
|
var tbj = t.ToLocalTime();
|
|
DateTime utcTime = DateTime.Now.ToUniversalTime();
|
|
|
|
long ticks = (utcTime.Ticks - 621355968000000000) / 10000000;
|
|
long weekStart = AppTime.GetThisWeekStartTime1(tnowSecond);
|
|
DateTime tweekStart = AppTime.ConvertUnixTimeToDateTime(weekStart * 1000);
|
|
|
|
long weekEnd = AppTime.GetThisWeekEndTime(tnowSecond);
|
|
DateTime tweekEnd = AppTime.ConvertUnixTimeToDateTime(weekEnd * 1000);
|
|
|
|
long todayStartTime = AppTime.GetTodayStartTime(tnowSecond);
|
|
DateTime ttodayStartTime = AppTime.ConvertUnixTimeToDateTime(todayStartTime * 1000);
|
|
|
|
string token = GuestAccountCrypto.GetAccountToken("ladjsflgjsldkfjgldfgsdf");
|
|
|
|
|
|
string szCh = "中文";
|
|
|
|
int iLength = szCh.Length;
|
|
|
|
char c1 = szCh[0];
|
|
char c2 = szCh[1];
|
|
|
|
byte[] bytes = Encoding.UTF8.GetBytes(szCh);
|
|
|
|
string hexSz = "";
|
|
for(int i=0; i<bytes.Length; i++)
|
|
{
|
|
hexSz += bytes[i].ToString("X");
|
|
}
|
|
|
|
|
|
//System.Text.Encoding.UTF8.to
|
|
|
|
TestGoogle testGoogle = new TestGoogle();
|
|
testGoogle.Test();
|
|
|
|
TestPerformance testPerf = new TestPerformance();
|
|
testPerf.Test();
|
|
|
|
Console.ReadKey();
|
|
}
|
|
}
|
|
}
|
|
|