Skip to content

Commit a15f6d7

Browse files
author
Konstantin Ivaschenko
committed
[DXFC-413] Incorrect date handling when system calendar is set to Buddhist calendar
1 parent e86421d commit a15f6d7

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

ReleaseNotes.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* [DXFC-413] Incorrect date handling when system calendar is set to Buddhist calendar
2+
13
Version 8.8.2
24
* [DXFC-400] Fixed a bug with passing a UNICODE path to a file as a parameter of the logging initialization and settings loading function.
35
- For the changes to work reliably, you need to set the default encoding to UTF-8, for example, as indicated by the link:

dxf_native/src/CandleDataConnection.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
using System;
1313
using System.Collections.Generic;
14+
using System.Globalization;
1415
using System.IO;
1516
using System.Net;
1617
using System.Text;
@@ -126,11 +127,10 @@ private static string CreateQuery(IEnumerable<CandleSymbol> symbols, DateTime fr
126127
{
127128
return "records=Candle&" +
128129
$"symbols={string.Join(",", symbols).Replace("&", "[%26]")}&" +
129-
$"start={fromTime.ToUniversalTime():yyyyMMdd-HHmmss}Z&" +
130-
$"stop={toTime.ToUniversalTime():yyyyMMdd-HHmmss}Z&" +
130+
$"start={fromTime.ToUniversalTime().ToString("yyyyMMdd-HHmmss", CultureInfo.InvariantCulture)}Z&" +
131+
$"stop={toTime.ToUniversalTime().ToString("yyyyMMdd-HHmmss", CultureInfo.InvariantCulture)}Z&" +
131132
"format=binary&" +
132-
"compression=zip&" +
133-
"skipServerTimeCheck";
133+
"compression=zip";
134134
}
135135
}
136136
}

dxf_native/src/TimeAndSaleDataConnection.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
using System;
1313
using System.Collections.Generic;
14+
using System.Globalization;
1415
using System.IO;
1516
using System.Net;
1617
using System.Text;
@@ -125,11 +126,10 @@ private static string CreateQuery(IEnumerable<string> symbols, DateTime fromTime
125126
{
126127
return "records=TimeAndSale&" +
127128
$"symbols={string.Join(",", symbols).Replace("&", "[%26]")}&" +
128-
$"start={fromTime.ToUniversalTime():yyyyMMdd-HHmmss}Z&" +
129-
$"stop={toTime.ToUniversalTime():yyyyMMdd-HHmmss}Z&" +
129+
$"start={fromTime.ToUniversalTime().ToString("yyyyMMdd-HHmmss", CultureInfo.InvariantCulture)}Z&" +
130+
$"stop={toTime.ToUniversalTime().ToString("yyyyMMdd-HHmmss", CultureInfo.InvariantCulture)}Z&" +
130131
"format=binary&" +
131-
"compression=zip&" +
132-
"skipServerTimeCheck";
132+
"compression=zip";
133133
}
134134
}
135135
}

0 commit comments

Comments
 (0)