1
0
Fork 0

Expose local timezone offset in the property tree.

This commit is contained in:
curt 2005-11-17 15:47:01 +00:00
parent 9df7af3924
commit 40bd985d36

View file

@ -509,7 +509,7 @@ void
FGProperties::update (double dt) FGProperties::update (double dt)
{ {
// Date and time // Date and time
struct tm * t = globals->get_time_params()->getGmt(); struct tm *t = globals->get_time_params()->getGmt();
fgSetInt("/sim/time/utc/year", t->tm_year + 1900); fgSetInt("/sim/time/utc/year", t->tm_year + 1900);
fgSetInt("/sim/time/utc/month", t->tm_mon + 1); fgSetInt("/sim/time/utc/month", t->tm_mon + 1);
@ -522,6 +522,9 @@ FGProperties::update (double dt)
t->tm_hour * 3600 + t->tm_hour * 3600 +
t->tm_min * 60 + t->tm_min * 60 +
t->tm_sec); t->tm_sec);
fgSetInt("/sim/time/local-offset",
globals->get_time_params()->get_local_offset());
} }