[patch_done] TimeStamp patch

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Shagrat3
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 28.07.2009, 16:02
Contact:

[patch_done] TimeStamp patch

Postby Shagrat3 » 11.12.2012, 15:21

TimeStamp patch

[code]Index: ZDbcPostgreSqlStatement.pas
===================================================================
--- ZDbcPostgreSqlStatement.pas (revision 1553)
+++ ZDbcPostgreSqlStatement.pas (working copy)
@@ -436,7 +436,7 @@
[FormatDateTime('hh":"mm":"ss', SoftVarManager.GetAsDateTime(Value))]);
stTimestamp:
Result := Format('''%s''::timestamp',
- [FormatDateTime('yyyy-mm-dd hh":"mm":"ss',
+ [FormatDateTime('yyyy-mm-dd hh":"mm":"ss"."zzz',
SoftVarManager.GetAsDateTime(Value))]);
stAsciiStream:
begin
[/code]
You do not have the required permissions to view the files attached to this post.

User avatar
EgonHugeist
Zeos Dev Team
Zeos Dev Team
Posts: 1739
Joined: 31.03.2011, 22:38

Postby EgonHugeist » 12.12.2012, 08:06

Shagrat3,

first of all, is see you use my old branch. Please stop doing this use http://svn.code.sf.net/p/zeoslib/code-0 ... es/testing instead.

Accordingly you patch: Do you know if all postgre servers do understand the milliseconds syntax? If no than we can bind your patch to a server or client version xUP. What do you think?
King regards, Michael

You want to help? viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image

Shagrat3
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 28.07.2009, 16:02
Contact:

Postby Shagrat3 » 12.12.2012, 12:52

http://www.postgresql.org/docs/7.1/stat ... etime.html
Version 7.1 has "ms"

http://www.postgresql.org/docs/9.2/stat ... etime.html
Version 9.2 has "ms" to

When i use synchronization from table1 to table2 without "ms"
I have a wrong values
Last edited by Shagrat3 on 12.12.2012, 12:56, edited 1 time in total.

marcov
Senior Boarder
Senior Boarder
Posts: 94
Joined: 24.06.2010, 09:17

Postby marcov » 12.12.2012, 19:59


User avatar
EgonHugeist
Zeos Dev Team
Zeos Dev Team
Posts: 1739
Joined: 31.03.2011, 22:38

Postby EgonHugeist » 14.12.2012, 22:36

Shagrat3,

thanks. Patch applied Rev. 2076 \testing-7.1 (behavior freeze on Zeos7.0.x) with some little changes. On Zeos7 \testing-7.1 we've got some more Statement-Types. I've also opened this door for ftTime-Fields + PostgreSQL.

marcov,

thanks for the cross-links to SQLDB. The MSec support for FireBird exists longer than i'm team-member on ZeosLib
King regards, Michael

You want to help? viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image

marcov
Senior Boarder
Senior Boarder
Posts: 94
Joined: 24.06.2010, 09:17

Postby marcov » 15.12.2012, 21:34

Note that I couldn't quickly find reports for other database types doesn't mean they don't support it.

It might be that those changes were bundled with other fixes for e.g. Mysql.

User avatar
EgonHugeist
Zeos Dev Team
Zeos Dev Team
Posts: 1739
Joined: 31.03.2011, 22:38

Postby EgonHugeist » 16.12.2012, 12:59

marcov,

yes that's right, Marco.

I've googled some RDBMS we do support:

MySQL does support it since v5.6: https://blogs.oracle.com/MySqlOnWindows ... n_datetime
So we can add this support by checking the version (not very cool)

The SQLDB for SQLite does use Double values. We currently store formated strings without msecs. But i can imagine this will work too (SQLite is lazy on proofing the values). Also do i think about supporting a generic way to read DateTime values written with SQLDB.

All other Drivers do allready support the msecs.
King regards, Michael

You want to help? viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image


Return to “ZeosLib 7.0 Beta Forum”

Who is online

Users browsing this forum: No registered users and 1 guest