Example usage for com.google.gson.internal.bind.util ISO8601Utils format

List of usage examples for com.google.gson.internal.bind.util ISO8601Utils format

Introduction

In this page you can find the example usage for com.google.gson.internal.bind.util ISO8601Utils format.

Prototype

public static String format(Date date, boolean millis, TimeZone tz) 

Source Link

Document

Format date into yyyy-MM-ddThh:mm:ss[.sss][Z|[+-]hh:mm]

Usage

From source file:com.thoughtworks.go.api.base.JsonOutputWriter.java

License:Apache License

public static String jsonDate(Date value) {
    return value == null ? null : ISO8601Utils.format(value, false, UTC);
}

From source file:com.thoughtworks.go.server.service.MaintenanceModeService.java

License:Apache License

public String updatedOn() {
    return ISO8601Utils.format(updatedOnTimeStamp(), false, UTC);
}

From source file:com.yandex.money.api.time.Iso8601Format.java

License:Open Source License

/**
 * Formats date time to ISO 8601 string.
 *
 * @param dateTime date time to format/*from  w  ww .  j  av  a 2  s .  c o m*/
 * @return formatted string
 */
public static String format(DateTime dateTime) {
    Calendar calendar = checkNotNull(dateTime, "dateTime").getCalendar();
    return ISO8601Utils.format(calendar.getTime(), true, calendar.getTimeZone());
}