[Overview][Procedures and functions][Variables][Index] |
Convert epoch time to local time
Source position: unixutil.pp line 37
procedure EpochToLocal( |
epoch: LongInt; |
var year: Word; |
var month: Word; |
var day: Word; |
var hour: Word; |
var minute: Word; |
var second: Word |
); |
Converts the epoch time (=Number of seconds since 00:00:00, January 1, 1970, corrected for your time zone) to local date and time.
This function takes into account the timezone settings of your system.
None
|
Convert local time to epoch (UNIX) time |
Program Example3; { Program to demonstrate the EpochToLocal function. } Uses BaseUnix,Unix,UnixUtil; Var Year,month,day,hour,minute,seconds : Word; begin EpochToLocal (FPTime,Year,month,day,hour,minute,seconds); Writeln ('Current date : ',Day:2,'/',Month:2,'/',Year:4); Writeln ('Current time : ',Hour:2,':',minute:2,':',seconds:2); end.