Share

Aperture

Tracker: Bugs

5 Incorrect time zone in OpenXmlExtractor metadata - ID: 2896533
Last Update: Settings changed ( igorrogov )

Hi,

OpenXmlExtractor.convertStringToDate(String value) works incorrect. For
example:
convertStringToDate("2009-11-12T09:52:00Z") = "Thu Nov 12 09:52:00 MSK
2009", but it should be "Thu Nov 12 12:52:00 MSK 2009".

The solution is to set UTC timezone for the utcFormat:
DateFormat utcFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
utcFormat.setCalendar(Calendar.getInstance(new SimpleTimeZone(0, "UTC")));


Igor Rogov ( igorrogov ) - 2009-11-12 11:13

5

Closed

Fixed

Antoni Mylka

general

1.3.1 - bugs

Public


Comments ( 2 )

Date: 2009-11-12 12:48
Sender: igorrogov

Yes, it works fine now. Thanks.


Date: 2009-11-12 12:23
Sender: mylkaProject Admin

Applied a litle fix. made the convertStringToDate method use the
DateUtil.stringToDateTime method from the DateUtil class. It seems to work.
I switched the timezone on my laptop to Moscow time and the resulting
string yielded a correct value.

Applied the change in r2120 - please confirm and close the ticket


Attached File

No Files Currently Attached

Changes ( 5 )

Field Old Value Date By
status_id Open 2009-11-12 12:48 igorrogov
resolution_id None 2009-11-12 12:48 igorrogov
allow_comments 1 2009-11-12 12:48 igorrogov
close_date - 2009-11-12 12:48 igorrogov
assigned_to nobody 2009-11-12 12:23 mylka