Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114042 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 31952 invoked from network); 12 Apr 2021 18:20:50 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Apr 2021 18:20:50 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5FACF1804DA for ; Mon, 12 Apr 2021 11:21:25 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from sirabella.org (sirabella.org [207.246.81.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 12 Apr 2021 11:21:24 -0700 (PDT) Date: Mon, 12 Apr 2021 11:21:22 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sirabella.org; s=mail; t=1618251683; bh=XJ1cSoR7HDP9Uc5Pp86bpxaaY5Kkh13h673Cp+h6jRc=; h=Date:From:To:Subject; b=BF7kDjRDpXhuOL1aNjG9n9Zs8TYy6kbwwhly363HM3OHKh7m2vhoFo6jvr7AJmXPk YfWcCKYlSBLTmrreoxC2rIXsGWP18aXQHYZ3n9iUQRxuu/TYeCjWkXRhpU7x1CRGU7 tvVGJsLTYLrM3VHpjIVcjCgow9iT7vF1GK6FS7d4= To: PHP internals Message-ID: <20210412182122.w25ddlzifttqvok3@Ridl3y> OpenPGP: id=814C92678D24FC4AA24366ED4CDC0A30858D94F0 url="http://hkps.pool.sks-keyservers.net/pks/lookup?op=get&search=0x4CDC0A30858D94F0" preference=SignEncrypt MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gz264njfvz5ayiji" Content-Disposition: inline Subject: Using timelib functions shipped with headers From: marco@sirabella.org (Marco Sirabella) --gz264njfvz5ayiji Content-Type: multipart/alternative; boundary="c4sgjti5z377m4go" Content-Description: Alternatives for "/tmp/neomutt-Ridl3y-1000-21897-4363460882817521111" Content-Disposition: inline --c4sgjti5z377m4go Content-Type: text/markdown; charset=us-ascii; variant=pandoc Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, I am writing an extension that creates a DateTime object where I have the unix timestamp and a UTC offset in minutes. ``` timelib_set_timezone_from_offset(ret->time, gt.offset); timelib_unixtime2local(ret->time, gt.time); ``` Unfortunately, even though I can pull in the headers with=20 `#include `, it doesn't seem those symbols are defi= ned anywhere to link: ``` $ readelf -Ws /usr/lib64/php8.0/lib64/libphp.so | grep timelib # nothing ``` Are these functions meant to be public? Can I use the headers as a public A= PI reference, or do I need to look somewhere else to see what is exposed? Thanks for your clarifications, --=20 Marco Sirabella --c4sgjti5z377m4go Content-Type: text/plain; variant=pandoc; markup=markdown; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, I am writing an extension that creates a DateTime object where I have the unix timestamp and a UTC offset in minutes. ``` timelib_set_timezone_from_offset(ret->time, gt.offset); timelib_unixtime2local(ret->time, gt.time); ``` Unfortunately, even though I can pull in the headers with=20 `#include `, it doesn't seem those symbols are defi= ned anywhere to link: ``` $ readelf -Ws /usr/lib64/php8.0/lib64/libphp.so | grep timelib # nothing ``` Are these functions meant to be public? Can I use the headers as a public A= PI reference, or do I need to look somewhere else to see what is exposed? Thanks for your clarifications, --=20 Marco Sirabella --c4sgjti5z377m4go Content-Type: text/html; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable -

Hello,

I am writing an extension that creates a DateTime object where I have th= e unix timestamp and a UTC offset in minutes.

timelib_set_timezone_from_offset(ret->time, gt.offset);
timelib_unixtime2local(ret->time, gt.time);

Unfortunately, even though I can pull in the headers with #include= <ext/date/lib/timelib.h>, it doesn=E2=80=99t seem those symbo= ls are defined anywhere to link:

$ readelf -Ws /usr/lib64/php8.0/lib64/libphp.so | grep timelib #=
 nothing

Are these functions meant to be public? Can I use the headers as a publi= c API reference, or do I need to look somewhere else to see what is exposed= ?

Thanks for your clarifications,

=E2=80=93 Marco Sirabella

--c4sgjti5z377m4go-- --gz264njfvz5ayiji Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEBIRfgYVlYchg5LyiLGTdD2kLPA4FAmB0j6IACgkQLGTdD2kL PA44qw//QSM2qj/WtFLUKvxCE3w9/8NFKFIBgH0z76PgX/Te0ly5IGS/lvl6yyW9 H7BPIBvP89raCz4mnaJeIPga0VdPsUflHmnhQzMzMGVneFZQ8Wz92VkYiy7ji6R1 S1H608kQum7sOXfjvdRr9nUkASxQDTm1rNcoUYNCCkJKJTehr+ixktFM4lNDJqFE j3pqE/wX0Qxq2cg9tD1lZOkEcnqn1Sxbyskfv+lUv1KZbn8ienTpqTYMQzLIAq2e cIRA4xIRqWeWrW6L/DzOs8BlffeatgFPRgqlN/1N9i2K+RRcTIy+nVZ/rz8tP86Q 21xroGQPMB1VqGxc75CiU6FKXxgqPM5HyAnKBCn+MYudY5UQ+54hyhC57QBkK3b0 q1SJ9wt/lAeSDPOdgTLnWm8qcRWsbBuRV/2okGdHdl2KWe2RbaLJkF+qQEfuFEYQ emClvunVuWwwAnVyOXFJ2fAlExsIFd6zy4OHyTltxolCZp/hdRFM2+tLOpqRCpYm nNkeLH5QusoCBFaSh25lYIcKx3l7F8kSPOLr82Rqki5l4mWnN2Kk7pFjwb5Rm+8k ZtEE2CYVaUEjqrHBfsk0QTYaR0pHpJKxH1a38puj2+W2lwll47Rc0uAkrh3cKp7+ /GKIH0nTP4+tX2dUaqy13x/eS6fdR8PxaAPLjek2Mu0yL+hUsyk= =IFSx -----END PGP SIGNATURE----- --gz264njfvz5ayiji--