Created
September 6, 2010 16:12
-
-
Save sriki77/567198 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DateFormat indiaDtFmt = new SimpleDateFormat("dd/MM/yyyy HH'h'mm"); | |
DateFormat gmtDtFmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |
indiaDtFmt.setTimeZone(TimeZone.getTimeZone("Asia/Calcutta")); | |
gmtDtFmt.setTimeZone(TimeZone.getTimeZone("GMT")); | |
Date worldWarIIDate = indiaDtFmt.parse("02/02/1944 06h30"); | |
Date nonWorldWarIIDate = indiaDtFmt.parse("02/02/2006 06h30"); | |
System.err.println(gmtDtFmt.format(worldWarIIDate) +" GMT"); | |
System.err.println(gmtDtFmt.format(nonWorldWarIIDate) +" GMT"); | |
1944-02-02 00:00:00 GMT | |
2006-02-02 01:00:00 GMT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment