#endif
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include <simgear/compiler.h>
#ifdef SG_HAVE_STD_INCLUDES
time_t cur_time;
// Break down of equivalent GMT time
+#if defined(_MSC_VER) || defined(__MINGW32__)
+ struct tm m_gmt; // copy of system gmtime(&time_t) structure
+#else
struct tm *gmt;
+#endif
// offset of local time relative to GMT
time_t local_offset;
inline char* get_zonename() const { return zonename; }
/** @return GMT in a "brokent down" tm structure */
+#if defined(_MSC_VER) || defined(__MINGW32__)
+ inline struct tm* getGmt()const { return (struct tm *)&m_gmt; };
+#else
inline struct tm* getGmt()const { return gmt; };
+#endif
/** @return julian date */
inline double getJD() const { return jd; };
* @return modified julian date */
double sgTimeCalcMJD(int mn, double dy, int yr);
+/**
+ * \relates SGTime
+ * Given an optional offset from current time calculate the current
+ * modified julian date.
+ * @param warp number of seconds to offset from current time (0 if no offset)
+ * @return current modified Julian date (number of days elapsed
+ * since 1900 jan 0.5), mjd. */
+double sgTimeCurrentMJD( long int warp );
+
/**
* \relates SGTime
* Given an mjd, calculate greenwich mean sidereal time, gst
* @param mjd modified julian date
- * @return greenwich mean sidereal time (gst)
- */
+ * @return greenwich mean sidereal time (gst) */
double sgTimeCalcGST( double mjd );
/**