The International Simutrans Forum

Development => Technical Documentation => Topic started by: hreintke on August 05, 2012, 03:26:01 PM

Title: Date and Time
Post by: hreintke on August 05, 2012, 03:26:01 PM
LS,

I am looking for a way to get the date and time of the simulation.
I already have month and year (welt->get_current_month() % 12 + 1, welt->get_current_month() / 12)

But how to get to days, hours, minutes and seconds ? Expect something with ticks ?

Kind regards,

Herman

Title: Re: Date and Time
Post by: Dwachs on August 05, 2012, 03:45:20 PM
Simutrans does not know other time units than years, months, and ticks. One month = ticks_per_world_month ticks.
Title: Re: Date and Time
Post by: Ters on August 05, 2012, 03:58:49 PM
Actually, Simutrans does know something about days, hours and minutes. It is displayed in the lower left corner depending on the show_month setting. I think it's just a visual thing, and whether a month has days or hours at all depends on the setting.