From: invalid@invalid.invalid   
      
   "Heinrich Wolf" schrieb im Newsbeitrag   
   news:es8g0c$vca$1@news1.nefonline.de...   
   ...   
   > Type GenaueZeit = Record   
   > GrobeZeit : DateTime;   
   > S100 : Word;   
   > End;   
   > JulianTime = Extended;   
   >   
   > Function JulianischeZeit(Z : GenaueZeit) : JulianTime;   
   > begin   
   > With Z, Z.GrobeZeit do   
   > JulianischeZeit :=   
   > JulianischerTag(Year, Month,   
   > Day + ((((S100 / 100) + Sec) / 60   
   > + Min) / 60   
   > + Hour) / 24);   
   > end;   
   >   
   > Function JulianischerTag (Jahr : Integer; Monat: Word; Tag :   
   > JulianTime)   
   > : JulianTime;   
   > { -4712 <= Jahr = year < 4000   
   > Monat = month: 1 = January to 12 = December   
   > Tag = day; fraction = time since midnight   
   > JulianischerTag begins at noon (!)   
   > calculation valid before and after gregorian calendar   
   > reformation (!)   
   > Oct 4, 1582 + 1 day = Oct 15, 1582 !   
   > } var y, m : LongInt;   
   ...   
      
   and then you easily convert JulianTime to time_t   
      
   function jt2time_t(t : JulianTime) : long;   
    const offset = { place julian time of Jan 1, 1970, 0:00:00 a.m. here! };   
    begin   
    jt2time_t := int((t - offset) * 24 * 60 * 60);   
    end;   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|