Advertisement
Guest User

Untitled

a guest
May 24th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. DateTimeZone zone = DateTimeZone.forID("Europe/Paris");
  2. ProphetChronology prophet = ProphetChronology.getInstance(zone);
  3. DateTime x = new DateTime(2020,5,1,16,0, prophet);
  4. DateTimeFormatter dtfOut = DateTimeFormat.forPattern("dd-MM-yyyy hh:mm:ss");
  5. System.out.println(dtfOut.print(x));
  6. DateTime y = x.withChronology(GregorianChronology.getInstance(zone));
  7. System.out.println(dtfOut.print(y));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement