Я пытаюсь изменить значение Timestamp
на DateTimeZone
в Joda:
DateTime dt = new DateTime(rs.getTimestamp("anytimestampcolumn"),
DateTimeZone.forID("anytimezone"));
Timestamp ts = new Timestamp(dt.getMillis());
-
Для
DateTime
значение равно:2013-04-13T22:56:27.000+03:00
-
Для
Timestamp
значение:2013-04-13 22:56:27.0
Timestamp
идет без разницы во времени.
Как я могу получить правильную отметку времени с помощью TimeZone? Например, я хочу получить "2013-05-13 01: 56: 27.0".
Спасибо заранее.
изменить: с использованием MySQL, тип столбца Timestamp
, конечно, rs
is ResultSet
.