Hallo, ich habe folgendes problem:
Gibt mir diesen output:
09.07.2009 00:00:00
Nun brauche ich den unix timestamp:
Das resultat ist das:
1247090400
Übersetzte ich nun das resultat bekomme ich das: Wed, 08 Jul 2009 22:00:00 GMT
Zwei stunden differenz!
Setzte ich nun das property so:
so stimmt meine transformation: 1247097600
Was mache ich falsch?
Java:
System.setProperty("user.timezone","Europe/Amsterdam"); // meine zeitzone
GregorianCalendar calendar = new GregorianCalendar(2009, 7 - 1, 9, 0, 0, 0);
SimpleDateFormat formatter = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");
formatter.format(calendar.getTime());
09.07.2009 00:00:00
Nun brauche ich den unix timestamp:
Java:
calendar.getTimeInMillis() / 1000
1247090400
Übersetzte ich nun das resultat bekomme ich das: Wed, 08 Jul 2009 22:00:00 GMT
Zwei stunden differenz!
Setzte ich nun das property so:
Java:
System.setProperty("user.timezone","Atlantic/Azores");
Was mache ich falsch?