timeline CreateItemAtSelection position wrong

I have a timeline planner which shows days with intervals of 1 hour.

When i use a button to create a new item at my selected position it inserts the item in the wrong position

with DBPlanner1.CreateItemAtSelection do
CaptionText := 'my text';

The above code inserts it at the corect time but one day earlier, e.g.

Selected position  = 4 Jan 10:00
Created position   = 3 Jan  10:00

Where am i going wrong?

Was retested here with a default Planner on the form and the code:

procedure TForm1.Button1Click(Sender: TObject);

procedure TForm1.FormCreate(Sender: TObject);
  planner1.Mode.PlannerType := plTimeLine;

but no problem could be seen. If the problem persists with the latest version, please contact by direct email and provide some sample source project with which we can reproduce the problem.

Hello Bruno
I modified multi day resource planner demo and i can repeat the error with the INS key.

The problem only happens on the last few cells of the day and on the first few cells on the following day.

Also the events are saved to the database but the planner fails to load some of them when switching dates.

I am using Delphi XE2, and planner version
I will try to send source by email/pm



Hi Bruno

What's your email address?
How can I send you the source code?


You can send your project to help@tmssoftware.com

sending sample projects for reproducing an issue, take following in account: <o:p></o:p>

- Include project file and ALL required form and source files

- Do NOT include EXE files 

- Do NOT include RAR file attachments, only ZIP file attachments

- Do NOT include projects with other 3rd party components

Ok Email Sent.

I tried same modified demo 26 project with the DBTimeLineSource component in Delphi 2010 and the compiled app shows same faulty behaviour just at the end of the day and start of next day.



Please make sure to set Planner.TimeLineStart to the actual correct desired value, 
in your code there was random time part added to it.