[fpc-pascal] Get Timestamp since 1970 (linux)

Henry Vermaak henry.vermaak at gmail.com
Mon Jun 4 11:05:39 CEST 2007


On 04/06/07, TOUZEAU DAVID <david.touzeau at fr.kaspersky.com> wrote:
> Dear
>
> Is there a function that help me to calculate seconds since 1970 year ?
>
> exactly the same of this command :
>
> /bin/date +%s -d 20070103
>

this will do what you want?:

function LocalToEpoch(
  year: Word;
  month: Word;
  day: Word;
  hour: Word;
  minute: Word;
  second: Word
):LongInt;

> best regards
>
>
> --
> David Touzeau -------------------------- Linux Ubuntu Dapper 6.0.6

henry



More information about the fpc-pascal mailing list