Fix datetime
This commit is contained in:
@@ -9,7 +9,6 @@ public static class PriceExtensions
|
||||
{
|
||||
public static List<Candle> GetCandles(this Round[] prices, Timeframe timeframe, Ticker ticker)
|
||||
{
|
||||
int timezoneOffset = -(int)(new DateTimeOffset(DateTime.UtcNow).Offset.TotalSeconds);
|
||||
var CHART_PERIODS = new Dictionary<Timeframe, int>
|
||||
{
|
||||
{ Timeframe.FiveMinutes, 60 * 5 },
|
||||
@@ -41,8 +40,8 @@ public static class PriceExtensions
|
||||
{
|
||||
candles.Add(new Candle
|
||||
{
|
||||
OpenTime = DateHelpers.GetFromUnixTimestamp(prevTsGroup + timezoneOffset),
|
||||
Date = DateHelpers.GetFromUnixTimestamp(tsGroup + timezoneOffset),
|
||||
OpenTime = DateHelpers.GetFromUnixTimestamp(prevTsGroup),
|
||||
Date = DateHelpers.GetFromUnixTimestamp(tsGroup),
|
||||
Open = o,
|
||||
High = h,
|
||||
Low = l,
|
||||
|
||||
Reference in New Issue
Block a user