Here you can find the source of utcToTimestamp(String utcTimestamp)
public static Timestamp utcToTimestamp(String utcTimestamp) throws ParseException
//package com.java2s; /**/*from ww w. j a v a2 s .c o m*/ * Copyright (c) 2009 University of Rochester * * This program is free software; you can redistribute it and/or modify it under the terms of the MIT/X11 license. The text of the * license can be found at http://www.opensource.org/licenses/mit-license.php and copy of the license can be found on the project * website http://www.extensiblecatalog.org/. * */ import java.sql.Timestamp; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static Timestamp utcToTimestamp(String utcTimestamp) throws ParseException { Timestamp timestamp; Date d = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ") .parse(utcTimestamp); timestamp = new Timestamp(d.getTime()); return timestamp; } }