]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_props.cxx
Fix line endings
[flightgear.git] / src / Main / fg_props.cxx
index 0a78154f99adf7be8b4afb78a5af3f4f20e6303c..3980a4f82671e25c41b5f859a1a2fbfae7176ac6 100644 (file)
 // $Id$
 
 #ifdef HAVE_CONFIG_H
-#  include <simgear/compiler.h>
+#  include "config.h"
 #endif
 
+#include <simgear/compiler.h>
+
 #include <simgear/structure/exception.hxx>
 #include <simgear/magvar/magvar.hxx>
 #include <simgear/timing/sg_time.hxx>
@@ -509,7 +511,7 @@ void
 FGProperties::update (double dt)
 {
                                 // 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/month", t->tm_mon + 1);
@@ -522,6 +524,9 @@ FGProperties::update (double dt)
                 t->tm_hour * 3600 +
                 t->tm_min * 60 +
                 t->tm_sec);
+
+    fgSetInt("/sim/time/local-offset",
+             globals->get_time_params()->get_local_offset());
 }
 
 
@@ -582,7 +587,7 @@ fgLoadFlight (istream &input)
 
 
 bool
-fgLoadProps (const char * path, SGPropertyNode * props, bool in_fg_root)
+fgLoadProps (const char * path, SGPropertyNode * props, bool in_fg_root, int default_mode)
 {
     string fullpath;
     if (in_fg_root) {
@@ -594,7 +599,7 @@ fgLoadProps (const char * path, SGPropertyNode * props, bool in_fg_root)
     }
 
     try {
-        readProperties(fullpath, props);
+        readProperties(fullpath, props, default_mode);
     } catch (const sg_exception &e) {
         guiErrorMessage("Error reading properties: ", e);
         return false;