Merge "Inherit from oparent"
[vfc/nfvo/wfengine.git] / winery / org.eclipse.winery.repository / src / test / java / org / eclipse / winery / librarytests / DateTest.java
1 /*******************************************************************************
2  * Copyright (c) 2012-2013 University of Stuttgart.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * and the Apache License 2.0 which both accompany this distribution,
6  * and are available at http://www.eclipse.org/legal/epl-v10.html
7  * and http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Contributors:
10  *     Oliver Kopp - initial API and implementation
11  *******************************************************************************/
12 package org.eclipse.winery.librarytests;
13
14 import java.text.ParseException;
15 import java.util.Date;
16 import java.util.Locale;
17
18 import org.apache.commons.lang3.time.DateUtils;
19
20 /**
21  * Date parsing test, when the system locale is not ENGLISH
22  */
23 public class DateTest {
24         
25         public static void main(String[] args) throws ParseException {
26                 // In case the following line is commented, this method throws a ParseException
27                 Locale.setDefault(Locale.ENGLISH);
28                 String modified = "Fri, 23 Mar 2012 11:04:56 GMT";
29                 Date modifiedDate = DateUtils.parseDate(modified, org.apache.http.impl.cookie.DateUtils.DEFAULT_PATTERNS);
30                 System.out.println(modifiedDate);
31         }
32         
33 }