Support Board
Date/Time: Thu, 27 Feb 2025 06:02:29 +0000
ACSIL, GetCurrentDateTime during replay + reload returns 00:00:00
View Count: 621
[2021-06-23 19:31:21] |
onnb - Posts: 662 |
GetCurrentDateTime works great usually. There is a specific scenario where it returns 00:00:00 in replay. To reproduce, using the code below Start the replay, see the timestamps look ok Click on Insert to force a reload You will see that output log prints a line with 00:00:00 and then resume printing ok. SCSFExport scsf_current_time_replay_vs_live(SCStudyInterfaceRef sc)
{ if (sc.SetDefaults) { sc.GraphName = "Current Time Replay vs. Live"; sc.GraphRegion = 0; return; } sc.AddMessageToLog(SCString().Format("study reload GetCurrentDateTime %s CurrentDateTimeForReplay %s CurrentSystemDateTime %s", sc.DateTimeToString(sc.GetCurrentDateTime(), FLAG_DT_COMPLETE_DATETIME).GetChars(), sc.DateTimeToString(sc.CurrentDateTimeForReplay, FLAG_DT_COMPLETE_DATETIME).GetChars(), sc.DateTimeToString(sc.CurrentSystemDateTime, FLAG_DT_COMPLETE_DATETIME).GetChars()), 0); } Example Log In the 3rd row is where I force a refresh. Notice the 4th line with the 00:00:00 Chart: Replay 1.00X: ESU21-cme[M] 1 Min #1 | Study: Current Time Replay vs. Live | study reload GetCurrentDateTime 2021-06-16 04:44:48 CurrentDateTimeForReplay 2021-06-16 04:44:48 CurrentSystemDateTime 2021-06-23 12:20:41 | 2021-06-23 12:20:41.739 Chart: Replay 1.00X: ESU21-cme[M] 1 Min #1 | Study: Current Time Replay vs. Live | study reload GetCurrentDateTime 2021-06-16 04:44:58 CurrentDateTimeForReplay 2021-06-16 04:44:58 CurrentSystemDateTime 2021-06-23 12:20:51 | 2021-06-23 12:20:51.751 Replay 1.00X: ESU21-cme[M] 1 Min #1 | Reloading chart. | 2021-06-23 12:20:52.545 Chart: Replay 1.00X: ESU21-cme[M] 1 Min #1 | Study: Current Time Replay vs. Live | study reload GetCurrentDateTime 00:00:00 CurrentDateTimeForReplay 00:00:00 CurrentSystemDateTime 2021-06-23 12:20:52 | 2021-06-23 12:20:52.988 Chart: Replay 1.00X: ESU21-cme[M] 1 Min #1 | Study: Current Time Replay vs. Live | study reload GetCurrentDateTime 2021-06-16 04:45:00 CurrentDateTimeForReplay 2021-06-16 04:45:00 CurrentSystemDateTime 2021-06-23 12:20:53 | 2021-06-23 12:20:53.046 |
[2021-06-26 03:46:14] |
onnb - Posts: 662 |
Following up on this, for now just trying to get a sense if this is an issue in SC or perhaps something I am missing.
|
To post a message in this thread, you need to log in with your Sierra Chart account: