Example usage for org.joda.time DateTimeZone UTC

List of usage examples for org.joda.time DateTimeZone UTC

Introduction

In this page you can find the example usage for org.joda.time DateTimeZone UTC.

Prototype

DateTimeZone UTC

To view the source code for org.joda.time DateTimeZone UTC.

Click Source Link

Document

The time zone for Universal Coordinated Time

Usage

From source file:com.magnet.mmx.server.plugin.mmxmgmt.message.MMXChannelSummary.java

License:Apache License

public MMXChannelSummary(String userId, String channelName, int publishedItemCount, Date lastPublishedItem) {
    this.userId = userId;
    this.channelName = channelName;
    this.publishedItemCount = publishedItemCount;
    DateTime d = new DateTime(lastPublishedItem, DateTimeZone.UTC);
    this.lastPublishedTime = d.toString();
}

From source file:com.magnet.mmx.server.plugin.mmxmgmt.message.MMXChannelSummary.java

License:Apache License

public MMXChannelSummary(String channelName, int publishedItemCount, Date lastPublishedItem) {
    this.channelName = channelName;
    this.publishedItemCount = publishedItemCount;
    DateTime d = new DateTime(lastPublishedItem, DateTimeZone.UTC);
    this.lastPublishedTime = d.toString();
}

From source file:com.magnet.mmx.server.plugin.mmxmgmt.message.MMXTopicSummary.java

License:Apache License

public MMXTopicSummary(String topicName, int publishedItemCount, Date lastPublishedItem) {
    this.topicName = topicName;
    this.publishedItemCount = publishedItemCount;
    DateTime d = new DateTime(lastPublishedItem, DateTimeZone.UTC);
    this.lastPublishedTime = d.toString();
}

From source file:com.mangosolutions.rcloud.rawgist.repository.git.GitHistoryOperation.java

private void setCommitDate(GistHistory history, Commit commit) {
    long timeInSeconds = commit.getTime();
    DateTime dateTime = new DateTime(timeInSeconds * 1000, DateTimeZone.UTC);
    history.setCommittedAt(dateTime);//from   w ww.  j  a va2 s . c  o m
}

From source file:com.manydesigns.portofino.pageactions.calendar.CalendarAction.java

License:Open Source License

public Resolution today() {
    referenceDateTime = new DateTime(DateTimeZone.UTC);
    return execute();
}

From source file:com.manydesigns.portofino.pageactions.calendar.CalendarAction.java

License:Open Source License

public void setReferenceDateTimeLong(long millis) {
    this.referenceDateTime = new DateTime(millis, DateTimeZone.UTC);
}

From source file:com.mastfrog.acteur.headers.DateTimeHeader.java

License:Open Source License

@Override
public DateTime toValue(String value) {
    long val = 0;
    if (val == 0) {
        try {//w w  w. ja  v  a 2 s  .co  m
            val = Headers.ISO2822DateFormat.parseDateTime(value).getMillis();
        } catch (IllegalArgumentException e) {
            try {
                //Sigh...use java.util.date to handle "GMT", "PST", "EST"
                val = Date.parse(value);
            } catch (IllegalArgumentException ex) {
                new IllegalArgumentException(value, ex).printStackTrace();
                return null;
            }
        }
    }
    DateTime result = new DateTime(val, DateTimeZone.UTC);
    //to be truly compliant, accept 2-digit dates
    if (result.getYear() < 100 && result.getYear() > 0) {
        if (result.getYear() >= 50) {
            result = result.withYear(2000 - (100 - result.getYear())).withDayOfYear(result.getDayOfYear() - 1); //don't ask
        } else {
            result = result.withYear(2000 + result.getYear());
        }
    }
    return result;
}

From source file:com.mastfrog.acteur.headers.Headers.java

License:Open Source License

public static String toISO2822Date(DateTime dt) {
    dt = new DateTime(dt.getMillis(), DateTimeZone.UTC);
    return dt.toDateTime(DateTimeZone.UTC).toDateTimeISO().toString(ISO2822DateFormat);
}

From source file:com.mastfrog.acteur.ResponseHeaders.java

License:Open Source License

protected DateTime getLastModified() {
    DateTime dt = lastModified;/*ww  w .j a  v a  2 s  .c o m*/
    if (dt != null) {
        dt = new DateTime(dt.getMillis(), DateTimeZone.UTC).withMillisOfSecond(0);
    }
    return dt;
}

From source file:com.messagemedia.restapi.client.v1.messaging.deliveryreports.DeliveryReport.java

License:Apache License

/**
 * Return a DateTime that indicates when the message was received.
 *
 * @return the date/time when the Delivery Report was received
 *//* w ww .  j  av a 2  s.  co  m*/
public DateTime getDateReceived() {
    return new DateTime(dateReceived.getMillis(), DateTimeZone.UTC);
}