gpt4 book ai didi

yahoo-finance - 雅虎 API 时区

转载 作者:行者123 更新时间:2023-12-02 22:30:05 27 4
gpt4 key购买 nike

我如何从 yahoo api 接收到接收到的日期时间的特定时区?

默认时区是什么?

http://hk.finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&s=USDHKD=x

http://finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&s=USDHKD=x

接收时间相同

private String GetRequest() throws ClientProtocolException, IOException{
HttpClient httpClient = new DefaultHttpClient();
HttpContext localContext = new BasicHttpContext();
HttpGet httpGet = new HttpGet("http://finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&s=USDHKD=x");
HttpResponse response = httpClient.execute(httpGet, localContext);

BufferedReader reader = new BufferedReader(
new InputStreamReader(
response.getEntity().getContent()
)
);

String line;
while ((line = reader.readLine()) != null) {
String[] RowData = line.split(",");
String value = RowData[1];//value = qoute
String date = RowData[2].replaceAll("\"", "");
String time = RowData[3].replaceAll("\"", "");
tvDateTimeValue.setText(date+"\t"+time);
return value;
}
return "";
}

最佳答案

看起来是 America/New_York 时区。

这些人也是这么想的(虽然不确定他们的信息来源是什么)

http://www.kksou.com/php-gtk2/Joomla-Gadgets/Yahoo-Stock-Quote-AJAX-version.php

关于yahoo-finance - 雅虎 API 时区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12415301/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com