Hi,
This is a bug. For now, you can set this value manually, for example:
// use Day function to get day of year, need to declare first
int Day(double date, int option = 1); // option = 1 for month day, = 2 for year day
void testSYSTEMTIME_TM()
{
SYSTEMTIME systime;
TM t;
GetSystemTime(&systime);
systemtime_to_tm(&t, &systime);
double lpdDate;
SystemTimeToJulianDate(&lpdDate, &systime); // get Julian date from SYSTEMTIME
int nYDay = Day(lpdDate, 2); // get day of year
if(nYDay >= 0)
t.tm_yday = nYDay; // set tm_yday
}
Penn