-
刚才仔细看了一下,我之前的使用是有问题的,这里的时间只有到日期。而那么Year,Month,Day属性只是已经解析好的年,月,日值,不用再处理的!使用方法应该如下:
Weather weather = e.InPacket.Weathers[0];
WL("成功读取天气预报,地区:{0} {1} 日期:{2}年{3}月{4}日 最高温度:{5} 最低温度:{6} 风向:{7} 描述:{8}", e.InPacket.Province, e.InPacket.City, weather.Year,
weather.Month, weather.Day, weather.HighTemperature, weather.LowTemperature, weather.Wind, weather.ShortDesc); -
@阿不
void PrivateManager_GetWeatherSuccessed(object sender, QQEventArgse)
{
Weather weather = e.InPacket.Weathers[0];
WL("成功读取天气预报,地区:{0} {1} 日期:{4} 最高温度:{2} 最低温度:{3}", e.InPacket.Province, e.InPacket.City, weather.HighTemperature, weather.LowTemperature, weather.Year + "年" +
weather.Month + "月" + weather.Day + "日");
}
这样打印出来的结果是:
1年1月2日
日期处理还是有问题……












关于在于它返回是一个整型的数字,如何把这个整型的数字解释成时间类型很头育痛。