diff --git a/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_AP203Context.cxx b/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_AP203Context.cxx index e63c9c9710..ad7ce1c097 100644 --- a/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_AP203Context.cxx +++ b/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_AP203Context.cxx @@ -64,6 +64,11 @@ #include #endif +// needed for timezone XSI compatibility check +#if defined(__FreeBSD__) + #include +#endif + //================================================================================================= STEPConstruct_AP203Context::STEPConstruct_AP203Context() @@ -112,6 +117,10 @@ occ::handle STEPConstruct_AP203Context::DefaultDateAndTim #if defined(_MSC_VER) && _MSC_VER >= 1600 long shift = 0; _get_timezone(&shift); +#elif defined(__FreeBSD__) && __FreeBSD_version < 1500019 + time_t time_clock = time(NULL); + struct tm* time_struct = localtime(&time_clock); + int shift = int(time_struct->tm_gmtoff); #else int shift = int(timezone); #endif