mirror of
https://gitlab.com/buildfeed/BuildFeed.git
synced 2024-03-22 21:10:34 +08:00
39 lines
1.0 KiB
C#
39 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
using MBuildModel = RedisMongoMigration.Mongo.BuildModel;
|
|
using MBuild = RedisMongoMigration.Mongo.Build;
|
|
using RBuild = RedisMongoMigration.Redis.Build;
|
|
|
|
namespace MongoTimeChecker
|
|
{
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
var builds = RBuild.Select();
|
|
|
|
MBuild mBuildObj = new MBuild();
|
|
foreach (var build in builds)
|
|
{
|
|
var mBuild = mBuildObj.SelectByLegacyId(build.Id);
|
|
if(mBuild != null)
|
|
{
|
|
bool isSame = mBuild.BuildTime == build.BuildTime;
|
|
if(!isSame)
|
|
{
|
|
Console.WriteLine($"{build.FullBuildString}: {build.BuildTime} != {mBuild.BuildTime}");
|
|
DateTime dt = DateTime.SpecifyKind(build.BuildTime.Value, DateTimeKind.Utc);
|
|
mBuildObj.UpdateDateOfLegacy(build.Id, dt);
|
|
}
|
|
}
|
|
}
|
|
|
|
Console.ReadKey();
|
|
}
|
|
}
|
|
}
|