diff options
Diffstat (limited to 'gcc/ada/sysdep.c')
-rw-r--r-- | gcc/ada/sysdep.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c index df3bee2c3e8..c0489504f43 100644 --- a/gcc/ada/sysdep.c +++ b/gcc/ada/sysdep.c @@ -764,6 +764,22 @@ __gnat_localtime_tzoff (const time_t *timer, long *off) (*Lock_Task) (); +#ifdef RTX + + tzi_status = GetTimeZoneInformation (&tzi); + *off = tzi.Bias; + if (tzi_status == TIME_ZONE_ID_STANDARD) + /* The system is operating in the range covered by the StandardDate + member. */ + *off = *off + tzi.StandardBias; + else if (tzi_status == TIME_ZONE_ID_DAYLIGHT) + /* The system is operating in the range covered by the DaylightDate + member. */ + *off = *off + tzi.DaylightBias; + *off = *off * -60; + +#else + /* First convert unix time_t structure to windows FILETIME format. */ utc_time.ull_time = ((unsigned long long) *timer + w32_epoch_offset) * 10000000ULL; @@ -792,6 +808,8 @@ __gnat_localtime_tzoff (const time_t *timer, long *off) else *off = - (long) ((utc_time.ull_time - local_time.ull_time) / 10000000ULL); +#endif + (*Unlock_Task) (); } |