@Override
public void onResponse(@NonNull Call<ConfigurationData> call, @NonNull Response<ConfigurationData> response) {
CacheDb db = new CacheDb(this);
int statusCode = response.code();
ConfigurationData configData = response.body();
String dateString = response.headers().get("date");//date String
Date date = ..............//***I want this code***
switch (statusCode){
case 200:
db.setClass("config", configData);
startActivity(new Intent(SplashActivity.this, HomePage.class));
handler.removeCallbacks(null);
handler.removeCallbacksAndMessages(null);
SplashActivity.this.finish();
finish();
break;
default:
setDialog();
break;
}
}
@Override
public void onFailure(@NonNull Call<ConfigurationData> call, @NonNull Throwable t) {
setDialog();
}
我需要约会&#34; UTC&#34;来自不同的服务器PHP不要通过更改服务器来创建问题。日期字符串是不同的样本格式,我不知道使用什么格式? 我为说英语不好而道歉