0

I use below code for #1 screenshot.

int  _objfnd =  ObjectFind( name );
if ( _objfnd == -1 )
{
    ObjectCreate ( _vlineName, OBJ_VLINE, 0, Time[i], 0 );
    ...
}

enter image description here and I use below code for #2 screenshot.

int  _objfnd = ObjectFind( name );
if ( _objfnd == -1 )
{
    datetime    _dayTime = Time[i]                                       ;
    int         _dayNext = PeriodSeconds( _Session_Breaks_Day_Prd )      ;
                _dayTime = _dayTime - ( _dayTime % _dayNext ) + _dayNext ;

    ObjectCreate ( _vlineName, OBJ_VLINE, 0,  _dayTime, 0 )              ;
}

enter image description here If you figure out my concern,
please give me good advice, much appreciate.

enter image description here

Max-Enrik
  • 61
  • 13
  • 1
    Your previous questions asked for giving advice, but with no accepting the provided ones. **Why** do you think the community sponsors would repeatedly elaborate a know-how transfer to serve you, without any adequate form of a recognised reward? There is something missing. – user3666197 Nov 13 '16 at 07:50
  • I do not understand, what do you meant? Could not I **ask / advice** something? – Max-Enrik Nov 13 '16 at 12:48
  • Please check out link, then let me know. [Screenshot](https://cdn.pbrd.co/images/qM2rCeT6W.png) – Max-Enrik Nov 13 '16 at 15:19
  • Rather post the image content directly inside your [ Question ] – user3666197 Nov 13 '16 at 15:35
  • Sorry, English is not my native language, I struggle to understand your latest comment, please. – Max-Enrik Nov 13 '16 at 15:52
  • Put your [ Screenshot ] image right into your [ Question ], instead of the URL-link in comment. + >>> https://translate.google.com/#en/ru/Put%20your%20%5B%20Screenshot%20%5D%20image%20right%20into%20your%20%5B%20Question%20%5D%2C%20instead%20of%20the%20URL-link%20in%20comment. – user3666197 Nov 13 '16 at 16:16
  • Oh! I never mind. – Max-Enrik Nov 13 '16 at 17:56
  • So your comments about that? – Max-Enrik Nov 13 '16 at 18:38
  • Man, I need to sure, please let me. – Max-Enrik Nov 13 '16 at 21:34

1 Answers1

1

A: the code has not handled Daylight Saving Time Shift 2016, Nov-06

user3666197
  • 1
  • 6
  • 50
  • 92
  • 1
    The trivial code example posted in question above by `_dayNext = PeriodSeconds( _Session_Breaks_Day_Prd );` simply **adds** `... + _dayNext;` a **constant** amount of seconds `== PeriodSeconds()` **incorrectly even for a day, which is one hour shorter** ( the Daylight Saving Time shift-day, which was Nov-06 this year, which was visually confirmed in the graph). **`Q.E.D.`** – user3666197 Nov 13 '16 at 19:30
  • I believe your comment right, I think my indicator code wrong somewhere. I try to fix my issue with your comment, also I research for it. Thanks. – Max-Enrik Nov 13 '16 at 22:13