Skip to content

Java generates incorrect time in XML. #86

@GoogleCodeExporter

Description

@GoogleCodeExporter
I'm using the IVEF trunk, downloaded at mid november 2012.

If I generate an XML message with a date in it, the string representation in 
the generated XML will represent the date-and-time using my current locale 
setting. That's not correct. It should always be in the UTC time-zone.

E.g. in VoyageData.java, method toXML there are the following code snippets:

 DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");

and 

 xml += " UpdateTime=\"" + df.format(m_updateTime) + "\"";

The "df.format" should use a TimeZone for UTC. E.g.:

df.setTimeZone(TimeZone.getTimeZone("UTC"));

Original issue reported on code.google.com by H.Abb...@marin.nl on 6 Dec 2012 at 12:49

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions