Axis2 - Date Format

后端 未结 4 1541
小蘑菇
小蘑菇 2021-02-06 05:00

Scenario

The date format which is output as a response to the Web Service client by Axis2 is formatted as \"2009-08-28+01:00\". I would like to change this to show on

4条回答
  •  别跟我提以往
    2021-02-06 05:55

    There is a Calendar#clear method that will accomplish what you need. To get rid of the timezone offset simply do the following:

    cal.clear(Calendar.ZONE_OFFSET);

    Note that a time without a timezone offset is ambiguous. It leaves the consumer of the time to guess the UTC offset.

提交回复
热议问题