Merge pull request #43 from JackTerok/develop

Fix DateTime Bug
This commit is contained in:
HojouFotytu 2019-01-17 23:02:27 +09:00 committed by GitHub
commit f2a394cc2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -169,7 +169,7 @@ namespace Core.Main.DataObjects
//Convert Unix Timestamp to Datetime
System.DateTime dtDateTime = new DateTime(1970,1,1,0,0,0,System.DateTimeKind.Utc);
dtDateTime = dtDateTime.AddSeconds(rsld.soldDate).ToLocalTime();
dtDateTime = dtDateTime.AddSeconds(rsld.soldDate).ToUniversalTime();
// Profit Trailer sales are saved in UTC
DateTimeOffset ptSoldDate = DateTimeOffset.Parse(dtDateTime.Year.ToString() + "-" + dtDateTime.Month.ToString("00") + "-" + dtDateTime.Day.ToString("00") + "T" + dtDateTime.Hour.ToString("00") + ":" + dtDateTime.Minute.ToString("00") + ":" + dtDateTime.Second.ToString("00"), CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal);
@ -257,7 +257,7 @@ namespace Core.Main.DataObjects
//Convert Unix Timestamp to Datetime
System.DateTime rdldDateTime = new DateTime(1970,1,1,0,0,0,System.DateTimeKind.Utc);
rdldDateTime = rdldDateTime.AddSeconds(rdld.firstBoughtDate).ToLocalTime();
rdldDateTime = rdldDateTime.AddSeconds(rdld.firstBoughtDate).ToUniversalTime();
// Profit Trailer bought times are saved in UTC
if (rdld.firstBoughtDate > 0)
@ -319,7 +319,7 @@ namespace Core.Main.DataObjects
//Convert Unix Timestamp to Datetime
System.DateTime rpldDateTime = new DateTime(1970,1,1,0,0,0,System.DateTimeKind.Utc);
rpldDateTime = rpldDateTime.AddSeconds(rpld.firstBoughtDate).ToLocalTime();
rpldDateTime = rpldDateTime.AddSeconds(rpld.firstBoughtDate).ToUniversalTime();
// Profit Trailer bought times are saved in UTC
if (rpld.firstBoughtDate > 0)