Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import org.joda.time.*;
import org.joda.time.format.*;

public class Main {
    public static DateTime createTimeUTC(String UTCrepresentation) {
        DateTimeFormatter UTCformat = null;
        try {
            UTCformat = DateTimeFormat.forPattern("YYYYMMdd'T'HHmmssZ");
        } catch (IllegalArgumentException e) {
            e.printStackTrace();
        }
        return UTCformat.parseDateTime(UTCrepresentation);
    }
}