fork download
  1.  
  2. var d = new Date(2018, 7, 30);
  3. d.setMonth(1);
  4. print(d);
  5. var offset = 8; //以韓國時間為例,東9區
  6. var korean = d + (3600000 * offset);
  7. nd = new Date(korean);
  8. print(korean);
  9. print("Korean time is " + d.toLocaleString());
Success #stdin #stdout 0.01s 10780KB
stdin
1
2
10
42
11
stdout
Fri Mar 02 2018 00:00:00 GMT+0000 (UTC)
Fri Mar 02 2018 00:00:00 GMT+0000 (UTC)28800000
Korean time is Fri 02 Mar 2018 12:00:00 AM UTC