Commit 0e1ad53c authored by Roman S's avatar Roman S

Merge pull request #257 from sco0ter/of932

XEP-0202 Entity Time should respect Daylight Saving Time
parents ddf3fb28 15e98837
......@@ -71,7 +71,7 @@ public final class IQEntityTimeHandler extends IQHandler implements ServerFeatur
*/
String formatsTimeZone(TimeZone tz) {
// package-private for test.
int seconds = Math.abs(tz.getRawOffset()) / 1000;
int seconds = Math.abs(tz.getOffset(System.currentTimeMillis())) / 1000;
int hours = seconds / 3600;
int minutes = (seconds % 3600) / 60;
return (tz.getRawOffset() < 0 ? "-" : "+") + String.format("%02d:%02d", hours, minutes);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment