More Date Probs

Guest

More Date Probs

Postby Guest » Wed Aug 31, 2005 5:01 am

Can somebody please point me to the list of correct locales and date parsing masks?

My locale is new zealand and my dates are formattet as MM/DD/YY HH:MMa/p

How do I tell the parser to use this. Nothing I do seems to work.

dobisekm
Posts: 118
Joined: Wed Mar 23, 2005 3:29 pm
Location: Prague, Czech Republic

Postby dobisekm » Fri Sep 02, 2005 7:28 am

Hi,

from which source are you importing? (VSS, PVCS, etc.)

If your dates look like "09/01/05 11:21am", then the correct parsing string should be "MM/dd/yy hh:mma" (it's case sensitive!).

The locale name for new zealand is en_NZ.

Hope this helps,

Michal Dobisek, Polairon Team

sboland

If converting from VSS do NOT use am/pm style dates

Postby sboland » Fri Sep 23, 2005 4:49 pm

Date conversion is problematic and poorly documented, but apparently the time values being returned by VSS are not recognized. I'm assuming the project is using the java library so I used this page as reference:
http://java.sun.com/j2se/1.5.0/docs/api ... ormat.html

Note that am/pm is always formatted as AM or PM no matter if you use one character or two using this library. VSS always uses a single character in the time a or p. I suspect this causes problems. My workaround was to first change global environment to use 24 hour time, then (in the USA) used this value:
vss.log.dateformat=M/dd/yy HH:mm

dobisekm
Posts: 118
Joined: Wed Mar 23, 2005 3:29 pm
Location: Prague, Czech Republic

Postby dobisekm » Mon Sep 26, 2005 7:17 am

You are right that SimpleDateFormat is used for date parsing. Thanks for pointing out the problem with single character a/p and for suggesting workaround. We are actually used to use 24h format here, so we did not come across this problem beore.

Michal Dobisek, Polarion Team

pcgoober
Posts: 100
Joined: Thu Dec 01, 2005 9:40 pm

still receiving error: wrong date ...

Postby pcgoober » Thu Dec 01, 2005 9:49 pm

I have changed the regional setting to 24h time and used the shortest date format allowed but I still receive a wrong date error.

Here are my configuration lines from config.properties:

vss.log.dateformat=M.d.yy HH:mm
vss.log.datelocale=en

Here is a snippet from the log:

15:38:00,216 [main] ERROR VssHistoryParser:96 - wrong entry **********************
Label: "20020628"
User: SomeUser Date: 6/28/02 Time: 18:54
Labeled
Label comment:

15:38:00,266 [main] ERROR VssHistoryParser:96 - wrong date: 2/21/02 10:26
15:38:00,276 [main] ERROR VssHistoryParser:96 - wrong date line(1): User:SomeUser Date: 2/21/02 Time: 10:26***************** Version 1 *****************
User: SomeUser Date: 2/21/02 Time: 10:26
Created
Comment:


Any ideas why it would not read these correctly after changing the regional settings?

thanks

pcgoober
Posts: 100
Joined: Thu Dec 01, 2005 9:40 pm

I give the suggestion in post "VSS Date Issues" a

Postby pcgoober » Thu Dec 01, 2005 10:02 pm

and see what happens.

" Change the '.' separator to '/' "

pcgoober
Posts: 100
Joined: Thu Dec 01, 2005 9:40 pm

Re: I give the suggestion in post "VSS Date Issues"

Postby pcgoober » Thu Dec 01, 2005 10:17 pm

yep, that did it.

Still have empty comments not coming in though....

16:03:39,286 [main] ERROR VssHistoryParser:96 - wrong entry


Return to “Polarion SVN Importer (Repository Converter)”

Who is online

Users browsing this forum: No registered users and 5 guests