PTMagic/Monitor/Pages/_get/DashboardTop.cshtml.cs

31 lines
881 B
C#
Raw Normal View History

2018-05-22 10:11:50 +02:00
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Http;
using Core.Main;
using Core.Main.DataObjects;
using Core.Main.DataObjects.PTMagicData;
using Core.MarketAnalyzer;
namespace Monitor.Pages {
public class DashboardTopModel : _Internal.BasePageModelSecureAJAX {
public ProfitTrailerData PTData = null;
public DateTimeOffset DateTimeNow = Constants.confMinDate;
public void OnGet() {
// Initialize Config
base.Init();
BindData();
}
private void BindData() {
2018-12-31 04:26:45 +01:00
PTData = new ProfitTrailerData(PTMagicBasePath, PTMagicConfiguration);
2018-05-22 10:11:50 +02:00
// Convert local offset time to UTC
TimeSpan offsetTimeSpan = TimeSpan.Parse(PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset.Replace("+", ""));
DateTimeNow = DateTimeOffset.UtcNow.ToOffset(offsetTimeSpan);
}
}
}