world->info.timezone = 0.0f;
}
- time_t t;
- struct tm *tm;
- time( &t );
- tm = gmtime( &t );
- world->time = (float)tm->tm_min/20.0f + (world->info.timezone/24.0f);
+ time_t seconds = time(NULL) % ((u32)k_day_length*60);
+ world->time = ((f64)(seconds)/(k_day_length*60.0));
+ world->time += (world->info.timezone/24.0);
/* process resources from pack */
world_gen_load_surfaces( world );