[TD-2976]<fix>: check 1970 timestamp support in C# taosdemo (#5813)

This commit is contained in:
Huo Linhe 2021-04-15 10:56:48 +08:00 committed by GitHub
parent bcebfbe844
commit 80a87159ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -385,7 +385,7 @@ namespace TDengineDriver
public void CreateDb()
{
StringBuilder sql = new StringBuilder();
sql.Append("CREATE DATABASE IF NOT EXISTS ").Append(this.dbName).Append(" replica ").Append(this.replica);
sql.Append("CREATE DATABASE IF NOT EXISTS ").Append(this.dbName).Append(" replica ").Append(this.replica).Append(" keep 36500");
IntPtr res = TDengine.Query(this.conn, sql.ToString());
if (res != IntPtr.Zero)
{
@ -728,7 +728,7 @@ namespace TDengineDriver
int m = now.Minute;
int s = now.Second;
long baseTimestamp = 1609430400000; // 2021/01/01 0:0:0
long baseTimestamp = -16094340000; // 1969-06-29 01:21:00
VerbosePrintFormat("beginTime is {0} + {1}h:{2}m:{3}s\n", baseTimestamp, h, m, s);
long beginTimestamp = baseTimestamp + ((h * 60 + m) * 60 + s) * 1000;
Random random = new Random();