New milestone time formatting (Was: Differences among the "bomb" and "xbetween")

Liste des GroupesRevenir à cl prolog 
Sujet : New milestone time formatting (Was: Differences among the "bomb" and "xbetween")
De : janburse (at) *nospam* fastmail.fm (Mild Shock)
Groupes : comp.lang.prolog
Date : 26. Sep 2024, 12:22:24
Autres entêtes
Message-ID : <vd3g5f$p0ar$1@solani.org>
References : 1 2 3 4 5 6
User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.19
This became a rather lengthy subproject,
but still a rewarding one. Here are the
changes:
- atom_time/3: Renamed sys_time_atom/3 to
   atom_time/3. Changed signature a little bit,
   this is to format and scan local times.
- atom_utctime/3: Landed in library(util/spin).
   This is to format and scan local times.
Can other Prolog systems implement atom_utctime/3
correctly. SWI-Prolog lacks the mode scan mode,
and formatting goes wrong:
/* SWI-Prolog 9.3.11 */
?- format_time(atom(X), '%a, %d %b %Y %H:%M:%S', 1725635101.000, posix).
X = 'Fri, 06 Sep 2024 17:05:01'.
/* Dogelog Player 1.2.3 */
?- atom_utctime(X, '%a, %d %b %Y %H:%M:%S', 1725635101000).
X = 'Fri, 06 Sep 2024 15:05:01'.
The above is from a machine without locale 'C'.
Its not suitable for rfc1123. What does SWI-Prolog
do, it uses weekday and month names from GMT,
but otherwise it uses local hours:
1725635101 Timestamp to Human date  [batch convert]
Supports Unix timestamps in seconds,
milliseconds, microseconds and nanoseconds.
Assuming that this timestamp is in seconds:
GMT: Friday, 6. September 2024 15:05:01
Your time zone: Freitag, 6. September 2024 17:05:01 GMT+02:00 DST
Relative: 20 days ago
https://www.epochconverter.com/
See also:
All HTTP date/time stamps MUST be represented in
Greenwich Mean Time (GMT), without exception.
https://datatracker.ietf.org/doc/html/rfc2616#section-3.3.1

Date Sujet#  Auteur
28 Jul 24 * New milestone float formatting [LoL] (Was: Request for comments, Novacore the sequel to ISO modules)9Mild Shock
28 Jul 24 +* Re: New milestone float formatting [LoL] (Was: Request for comments, Novacore the sequel to ISO modules)4Mild Shock
28 Jul 24 i`* Re: New milestone float formatting [LoL] (Was: Request for comments, Novacore the sequel to ISO modules)3Mild Shock
24 Sep 24 i `* Re: Differences among the "bomb" and "xbetween" (Was: New milestone float formatting [LoL])2Mild Shock
26 Sep 24 i  `- New milestone time formatting (Was: Differences among the "bomb" and "xbetween")1Mild Shock
9 Oct 24 `* More Prolog Improvement Proposals (PIPs) [PIP401 - PIP404]4Mild Shock
9 Oct 24  `* Even More Prolog Improvement Proposals (PIPs) [PIP301 - PIP303] (Was: More Prolog Improvement Proposals (PIPs) [PIP401 - PIP404])3Mild Shock
9 Oct 24   `* Re: Even More Prolog Improvement Proposals (PIPs) [PIP301 - PIP303] (Was: More Prolog Improvement Proposals (PIPs) [PIP401 - PIP404])2Mild Shock
9 Oct 24    `- Re: Even More Prolog Improvement Proposals (PIPs) [PIP301 - PIP303] (Was: More Prolog Improvement Proposals (PIPs) [PIP401 - PIP404])1Mild Shock

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal