mirror of
https://github.com/zebrajr/postgres.git
synced 2025-12-06 12:20:15 +01:00
Patch from Barry Lind to correctly decode time zones in timestamp results.
Without patch, the time zone field is ignored and the returned time is not correct. Already applied to the development tree...
This commit is contained in:
parent
041c752fce
commit
0b471cc338
|
|
@ -499,13 +499,13 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
|||
// could optimize this a tad to remove too many object creations...
|
||||
SimpleDateFormat df = null;
|
||||
|
||||
if (s.length()>23 && subsecond) {
|
||||
if (sbuf.length()>23 && subsecond) {
|
||||
df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSzzzzzzzzz");
|
||||
} else if (s.length()>23 && !subsecond) {
|
||||
} else if (sbuf.length()>23 && !subsecond) {
|
||||
df = new SimpleDateFormat("yyyy-MM-dd HH:mm:sszzzzzzzzz");
|
||||
} else if (s.length()>10 && subsecond) {
|
||||
} else if (sbuf.length()>10 && subsecond) {
|
||||
df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
} else if (s.length()>10 && !subsecond) {
|
||||
} else if (sbuf.length()>10 && !subsecond) {
|
||||
df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
} else {
|
||||
df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user