HXTT Text(CSV)
Problems with times (and timezones?)
Remco Schoen
2009-11-02 02:21:53.0
Hello,

When jUnit-testing your driver version 4.2.102, we found this problem. In a text-file we have a time "02:12:31", but it is now returned as "03:12:31", so an hour later.

Is there some magic with timezones happening or what?

We have this text-file:
"id";"tijd";"tijd2"
1;02:13;02:12:31

And this url:
jdbc:text:/.?_CSV_Separator=\\x3b;_CSV_Quoter=\";_CSV_Header=true;delayedClose=0;timeFormat=HH:mm:ss

Kind regards,

Remco Schoen
Re:Problems with times (and timezones?)
HXTT Support
2009-11-04 12:14:57.0
Please download the latest package, which needn't GMT timezone conversion.
Re:Re:Problems with times (and timezones?)
Remco Schoen
2009-11-06 03:18:12.0
I tested version 4.2.103 and the time-zone problem seems to be resolved, but now my timeFormat isn't being honoured anymore.

If I use timeFormat=HH:mm and I have the string "02:12:31", it is now being returned as the time 02:12:31 in stead of 02:12:00.
Re:Re:Re:Problems with times (and timezones?)
HXTT Support
2009-11-10 05:48:55.0
>If I use timeFormat=HH:mm and I have the string "02:12:31", it is now
>being returned as the time 02:12:31 in stead of 02:12:00.
The latest package will detect that column as string type, or refuse to convert that value to time value.
Re:Re:Re:Re:Problems with times (and timezones?)
Remco Schoen
2009-11-11 04:27:18.0
My mistake, I wasn't clear enough. In the above case the time 02:21:31 isn't between quotes.

The value 02:12:31 in the colomn tijd2 isn't converted using my supplied time format.

I was expecting something like this:
System.out.println(new SimpleDateFormat("HH:mm:ss").format(new SimpleDateFormat("HH:mm").parse("02:13:31")));

Which returns 02:13:00.
Re:Re:Re:Re:Re:Problems with times (and timezones?)
HXTT Support
2009-11-11 05:54:49.0
Whether you need it can support
02:12:31
10:25
when with timeFormat=HH:mm
But won't throw data exception like dateFormat?
Re:Re:Re:Re:Re:Re:Problems with times (and timezones?)
Remco Schoen
2009-11-11 06:17:59.0
I found out, why my test failed, on which I concluded this.

The column type is now returned as LONGVARCHAR, but in the resultset I was using rs.getTime() to retrieve the value.

This does an implicit conversion from string to time, so making it a time with seconds.

So, the final conclussion is, it does work. Sorry, for the confussion.


Google