- // we lack the resolution for this, currently.
- r.microsecond = 0;
-
- r.second = to_convert.tm_sec;
- r.minute = to_convert.tm_min;
- r.hour = to_convert.tm_hour;
- r.day_in_month = to_convert.tm_mday;
- r.month = months(to_convert.tm_mon);
- r.year = to_convert.tm_year + 1900;
- r.day_of_week = days(to_convert.tm_wday);
- r.day_of_year = to_convert.tm_yday;
- r.millisecond = ms;
+ r.millisecond = useconds / 1000;
+ r.microsecond = useconds % 1000;
+
+ r.hour = cal_values.tm_hour;
+ r.minute = cal_values.tm_min;
+ r.second = cal_values.tm_sec;
+ r.day_in_month = cal_values.tm_mday;
+ r.month = months(cal_values.tm_mon);
+ r.year = cal_values.tm_year + 1900;
+ r.day_of_week = days(cal_values.tm_wday);
+ r.day_of_year = cal_values.tm_yday;
+
+ LOG(a_sprintf("convert() returning: %s\n",
+ r.text_form_long(clock_time::MILITARY,
+ day_in_year::LONG_MONTH | day_in_year::INCLUDE_DAY,
+ time_locus::LONG_YEAR).s()));
+