|
|
@@ -63,7 +63,7 @@ namespace Kitty_Fall.Apis.Business.Game
|
|
|
var pageNumber = request.pageNumber.GetValueOrDefault(1);
|
|
|
if (pageNumber <= 0) pageNumber = 1;
|
|
|
|
|
|
- var today = DateTime.Now.Date;
|
|
|
+ var today = MyanmarClock.Now.Date;
|
|
|
var defaultFromDate = today.AddDays(-30);
|
|
|
var fromDate = ParseHistoryDate(request.fromDate) ?? defaultFromDate;
|
|
|
var toDate = ParseHistoryDate(request.toDate) ?? today;
|
|
|
@@ -122,7 +122,7 @@ namespace Kitty_Fall.Apis.Business.Game
|
|
|
.Where(x => pageSessionIds.Contains(x.SessionId))
|
|
|
.ToListAsync();
|
|
|
|
|
|
- var now = DateTime.Now;
|
|
|
+ var now = MyanmarClock.Now;
|
|
|
var startOfMonth = new DateTime(now.Year, now.Month, 1);
|
|
|
var monthKey = now.Year * 100 + now.Month;
|
|
|
var totalTurn = await GetAvailableTurnAsync(msisdn, now);
|
|
|
@@ -255,7 +255,7 @@ namespace Kitty_Fall.Apis.Business.Game
|
|
|
var pageNumber = request.pageNumber.GetValueOrDefault(1);
|
|
|
if (pageNumber <= 0) pageNumber = 1;
|
|
|
|
|
|
- var now = DateTime.Now;
|
|
|
+ var now = MyanmarClock.Now;
|
|
|
var startOfMonth = new DateTime(now.Year, now.Month, 1);
|
|
|
var monthKey = now.Year * 100 + now.Month;
|
|
|
|
|
|
@@ -401,7 +401,7 @@ namespace Kitty_Fall.Apis.Business.Game
|
|
|
if (pageSize <= 0) pageSize = 15;
|
|
|
if (pageSize > 50) pageSize = 50;
|
|
|
|
|
|
- var today = DateTime.Now.Date;
|
|
|
+ var today = MyanmarClock.Now.Date;
|
|
|
var startOfCurrentMonth = new DateTime(today.Year, today.Month, 1);
|
|
|
var selectedDate = ParseHistoryDate(request.selectedDate) ?? today;
|
|
|
if (selectedDate < startOfCurrentMonth) selectedDate = startOfCurrentMonth;
|
|
|
@@ -418,7 +418,7 @@ namespace Kitty_Fall.Apis.Business.Game
|
|
|
return CommonLogic.BuildResponse(url, json, CommonErrorCode.Error, Lang.accountInvalid, new { });
|
|
|
}
|
|
|
|
|
|
- var now = DateTime.Now;
|
|
|
+ var now = MyanmarClock.Now;
|
|
|
var startOfMonth = new DateTime(now.Year, now.Month, 1);
|
|
|
var monthKey = now.Year * 100 + now.Month;
|
|
|
var totalTurn = await GetAvailableTurnAsync(msisdn, now);
|
|
|
@@ -523,7 +523,7 @@ namespace Kitty_Fall.Apis.Business.Game
|
|
|
return CommonLogic.BuildResponse(url, json, CommonErrorCode.Error, Lang.msisdnInvalid, new { });
|
|
|
}
|
|
|
|
|
|
- var today = DateTime.Now.Date;
|
|
|
+ var today = MyanmarClock.Now.Date;
|
|
|
var currentMonth = new DateTime(today.Year, today.Month, 1);
|
|
|
var minMonth = currentMonth.AddMonths(-11);
|
|
|
var maxMonthKey = ToMonthKey(currentMonth);
|
|
|
@@ -542,7 +542,7 @@ namespace Kitty_Fall.Apis.Business.Game
|
|
|
return CommonLogic.BuildResponse(url, json, CommonErrorCode.Error, Lang.accountInvalid, new { });
|
|
|
}
|
|
|
|
|
|
- var now = DateTime.Now;
|
|
|
+ var now = MyanmarClock.Now;
|
|
|
var startOfMonth = new DateTime(now.Year, now.Month, 1);
|
|
|
var currentMonthKey = now.Year * 100 + now.Month;
|
|
|
var totalTurn = await GetAvailableTurnAsync(msisdn, now);
|
|
|
@@ -645,7 +645,7 @@ namespace Kitty_Fall.Apis.Business.Game
|
|
|
return CommonLogic.BuildResponse(url, json, CommonErrorCode.Error, Lang.missingTransactionId, new { });
|
|
|
}
|
|
|
|
|
|
- var now = DateTime.Now;
|
|
|
+ var now = MyanmarClock.Now;
|
|
|
var mode = await GetGameModeAsync(request.gameType);
|
|
|
if (mode == null) return CommonLogic.BuildResponse(url, json, CommonErrorCode.Error, Lang.gameModeNotConfigured, new { });
|
|
|
var levelNo = NormalizeRequestedLevel(request.level);
|
|
|
@@ -759,7 +759,7 @@ namespace Kitty_Fall.Apis.Business.Game
|
|
|
return CommonLogic.BuildResponse(url, json, CommonErrorCode.Error, Lang.missingTransactionId, new { });
|
|
|
}
|
|
|
|
|
|
- var now = DateTime.Now;
|
|
|
+ var now = MyanmarClock.Now;
|
|
|
var mode = await GetGameModeAsync(request.gameType);
|
|
|
if (mode == null) return CommonLogic.BuildResponse(url, json, CommonErrorCode.Error, Lang.gameModeNotConfigured, new { });
|
|
|
var levelNo = NormalizeRequestedLevel(request.level);
|
|
|
@@ -1393,7 +1393,7 @@ namespace Kitty_Fall.Apis.Business.Game
|
|
|
{
|
|
|
var year = monthKey / 100;
|
|
|
var month = monthKey % 100;
|
|
|
- if (year < 1900 || month < 1 || month > 12) return new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
|
|
|
+ if (year < 1900 || month < 1 || month > 12) return new DateTime(MyanmarClock.Now.Year, MyanmarClock.Now.Month, 1);
|
|
|
return new DateTime(year, month, 1);
|
|
|
}
|
|
|
|