MySql Time Field problem

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
openside
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 25.06.2008, 18:28

MySql Time Field problem

Post by openside »

Hi all and thanks in advance for any replys.
This is probably a newb question but ...
I'm now working in Fedora 8, Lazarus 0.9.24 beta, ZeosLib 6.6.0 - beta and MySQL 5.0.45.

MySql table:
hours_id (Int not null default autoincrement)
start_time (time null)
end_time (time null)

In Lazarus, TZTable that connects to Mysql Database, No problems here.
My problem is that, when having a BdEdit to start_time (same on end_time) all is fine if time is between 00:00 and 11:59 or 13:00 and 00:00 but, if time is between 12:00 and 12:59, DbEdit will assume 00:00 insted of 12:00. I'm working in a 24h mode.
I've tried to use ShrortTimeFormat := 'hh:nn' but nothing seems to work.
Don't know if this is a Lazarus Bug or Zeos Bug ( it might be a feature and not a bug, don't know.)
I do know however how to solve the problem, just go and change the Mysql fields to a String type. This will solve the problem but it's not the right way to do it.

If I'm doing anything wrong, please tell me the right way to to do this. If this is a bug, please tell me anyway so that i will loose no more time with this.

Thanks in advance for any reply's.
Jpedro
OpenSide
Post Reply