我試圖在Java和參考this得到 「timezoneoffset的」,我實現了這一點: long unix_time_at_midnight;
DateFormat dateFormat= new SimpleDateFormat("MM/dd/yyyy");
Date d = new Date((unix_time*1000)/1000);
String d1 = dateFormat.
我有一個ASP.NET WebAPI實現,我允許客戶端使用並請求HTTP響應的XML或JSON格式。一些響應對象包括日期/時間值。我已經使用類似的代碼已經成功地讓JSON響應包括適當的ISO 8601格式的日期(包括UTC時間偏移): Dim json As JsonMediaTypeFormatter = _
GlobalConfiguration.Configuration.Form