This commit is contained in:
2022-12-27 23:45:08 +00:00
parent 8390f9aa33
commit d015e79043
2 changed files with 6 additions and 6 deletions

View File

@@ -262,7 +262,9 @@ namespace Sockeye.Biz
{ {
//create product if not exist then import //create product if not exist then import
//Get product id if exists //Get product id if exists
var p = await ct.Product.AsNoTracking().FirstOrDefaultAsync(z => z.Name == jPurchase["name"].Value<string>()); var ProductName = jPurchase["name"].Value<string>();
ProductName = ProductName.Replace("- Renewal", "").Replace(" Renewal", "").Replace(" RENEWAL", "").Replace("CANCELLED ", "");
var p = await ct.Product.AsNoTracking().FirstOrDefaultAsync(z => z.Name == ProductName);
if (p == null) if (p == null)
{ {
//Create it here //Create it here

View File

@@ -155,17 +155,15 @@ namespace Sockeye.Util
public static DateTime? EpochToDateNullIsNull(long? uepoch) public static DateTime? EpochToDateNullIsNull(long? uepoch)
{ {
DateTime dt = DateTime.Now;
if (uepoch == null) return null; if (uepoch == null) return null;
return DateTimeOffset.FromUnixTimeSeconds(uepoch.Value).DateTime; return DateTimeOffset.FromUnixTimeSeconds(uepoch.Value).UtcDateTime;
} }
public static DateTime EpochToDateNullIsMin(long? uepoch) public static DateTime EpochToDateNullIsMin(long? uepoch)
{ {
DateTime dt = DateTime.Now;
if (uepoch == null) return DateTime.MinValue; if (uepoch == null) return DateTime.MinValue;
return DateTimeOffset.FromUnixTimeSeconds(uepoch.Value).DateTime; return DateTimeOffset.FromUnixTimeSeconds(uepoch.Value).UtcDateTime;
} }