Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
?- get_time(T), stamp_date_time(T, X, 'UTC').
4.34.1.1 Time and date data-structures
We use the following time representations
TimeStamp
A TimeStamp is a floating point number expression the time in
seconds since the Epoch at 1970-1-1.
date(Y,M,D,H,Mn,S,Off,TZ,DST)
We call this term a date-time structure. The first 5 fields are
integers expressing the year, month (1..12), day (1..31), hour
(0..23), Minute (0..59). The S field holds the seconds as a
floating point number between 0.0 and 60.0. Off is an integer
representing the offset relative to UTC in seconds where positive
values are west of Greenwich. If converted from local time (see
stamp_date_time/3, TZ holds the name of the local timezone. If the
timezone is not known TZ is the atom -. DST is true if daylight
saving time applies to the current time, false if daylight saving
time is relevant but not effective and - if unknown or the timezone
has no daylight saving time.
date(Y,M.D)
Date using the same values as described above. Extracted using
date_time_value/3.
time(H,Mn,S)
Time using the same values as described above. Extracted using
date_time_value/3.
current_time(H,M) :-
get_time(TS),
stamp_date_time(TS,Date9,'local'),
arg(4,Date9,H),
arg(5,Date9,M).