Search Mailing List Archives
[protege-discussion] Locale dependend timestamp error
Ulf Licht
Ulf.Licht at esprit.com
Tue Mar 2 08:02:55 PST 2010
Hello,
when using Protege in client/server mode with database backend I ran into
an exception when trying to read changes on one client made from another
client. It seems to be a problem when clients are run with different Java
locales.
SEVERE: Exception caught parsing the changes ontology - it is
probably corrupted
java.text.ParseException: Unparseable date: "03/02/2010 11:55:59
MEZ" -- DefaultTimestamp.getDateParsed()
The timezone component "zzz" of the SimpleDateFormat pattern "MM/dd/yyyy
HH:mm:ss zzz", which is used in class
"edu.stanford.bmir.protegex.chao.ontologycomp.api.impl.DefaultTimestamp"
to format and parse timestamps, is locale dependent. Since no locale is
given when creating the "DATE_FORMAT" SimpleDateFormat instance the
default locale of the client will be used. When different clients with
different locale settings execute changes the timestamps will be written
into the database with the client locale dependend timezone format, which
results in a ParseException when reading it from the other client.
The default locale should only be used in the UI when displaying time
values to the user since then it will correctly reflect the client
settings. When storing information on a server a fixed locale or locale
independent representation should be used.
What do others think? Can a Bugzilla bug be opened for this?
Regards,
Ulf Licht
Integration Architect
Enterprise Architecture Management
Esprit Europe GmbH
Esprit-Allee
40882 Ratingen
P.O. Box:
Esprit Europe GmbH
40842 Ratingen
t +49 2102 123-0
f +49 2102 123-45100
i www.esprit.com
Amtsgericht Düsseldorf,
HRB 28967, VAT-ID: DE 162905814
Geschäftsführer: Heinz Krogner, Ernst-Peter Vogel, Jürgen Haas, Dr. Michael Niklas, Ronald van der Vis
Confidential Notice: The information in this document is confidential. It is intended only for the use of the named recipient. Internet communications are not secure and therefore our Company does not accept legal responsibility for the contents of this message. If you are not the intended recipient please notify us immediately and then delete this document.
Please consider your environmental responsibility before printing this e-mail
More information about the protege-discussion
mailing list