mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-21 15:27:15 +00:00
Last MWS report import date time saved
This commit is contained in:
@@ -24,7 +24,7 @@ namespace bnhtrade.Core.Data.AmazonMWS
|
||||
string attrVal = elemList[i].Attributes["timestamp"].Value;
|
||||
if (!string.IsNullOrWhiteSpace(attrVal))
|
||||
{
|
||||
returnTime = DateTime.Parse(attrVal);
|
||||
returnTime = DateTime.SpecifyKind(DateTime.Parse(attrVal), DateTimeKind.Utc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,6 @@ namespace bnhtrade.Core.Data.AmazonMWS
|
||||
throw new Exception("Error requesting time from Amazon");
|
||||
}
|
||||
|
||||
returnTime = returnTime.ToUniversalTime();
|
||||
returnTime = returnTime.AddTicks(-(returnTime.Ticks % TimeSpan.TicksPerSecond));
|
||||
|
||||
return returnTime;
|
||||
|
||||
@@ -8,6 +8,21 @@ namespace bnhtrade.Core.Data.Database
|
||||
{
|
||||
public static class Constants
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Gets the date bnhtrade started trading.
|
||||
/// </summary>
|
||||
/// <returns>Date and time</returns>
|
||||
public static DateTime GetBusinessStartUtc()
|
||||
{
|
||||
DateTime businessStart = new DateTime(2014, 09, 01);
|
||||
return DateTime.SpecifyKind(businessStart, DateTimeKind.Utc);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetProductConditionIdNew()
|
||||
{
|
||||
return 10;
|
||||
|
||||
@@ -12,14 +12,7 @@ namespace bnhtrade.Core.Data.Database.Log
|
||||
public DateTimeLog(string sqlConnectionString) : base(sqlConnectionString)
|
||||
{
|
||||
}
|
||||
public DateTime GetBusinessStartUtc
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime businessStart = new DateTime(2014, 09, 01);
|
||||
return DateTime.SpecifyKind(businessStart, DateTimeKind.Utc);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Date and Time by a unique string.
|
||||
/// </summary>
|
||||
@@ -56,6 +49,7 @@ namespace bnhtrade.Core.Data.Database.Log
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SetDateTimeUtc(string logDateTimeID, DateTime utcDateTime)
|
||||
{
|
||||
utcDateTime = DateTime.SpecifyKind(utcDateTime, DateTimeKind.Utc);
|
||||
@@ -86,6 +80,7 @@ namespace bnhtrade.Core.Data.Database.Log
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void NewDateTimeUtc(string LogDateTimeId, DateTime utcDateTime, string comments = null)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(LogDateTimeId))
|
||||
@@ -131,6 +126,5 @@ namespace bnhtrade.Core.Data.Database.Log
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user