Skip to content

Instantly share code, notes, and snippets.

@jhiemer
Created July 23, 2013 10:21
Show Gist options
  • Save jhiemer/6061383 to your computer and use it in GitHub Desktop.
Save jhiemer/6061383 to your computer and use it in GitHub Desktop.
GregorianCalendar gregorianCalendar = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
gregorianCalendar.add(GregorianCalendar.SECOND, -1 * gregorianCalendar.get(GregorianCalendar.SECOND));
=> Tue Jul 23 12:14:00 CEST 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment