Skip to content

Stdlib: SoapVar XSD_GYEAR/gMonth/gDay unix timestamps emit raw int — Zend to_xml_gyear* (ext/soap/php_encoding.c) #32240

Description

@PurHur

Category

stdlib · php-src-strict · child of #3724 · SOAP encoding batch (XSD gYear family)

Problem

php-src to_xml_gyear / to_xml_gyearmonth / to_xml_gmonthday / to_xml_gday / to_xml_gmonth format unix timestamps via to_xml_datetime_ex (%Y, %Y-%m, --%m-%d, ---%d, --%m--) plus timezone suffix. VM stringifies the integer for all five XSD_G* types.

Repro (2026-08-18, php8.2-soap, TZ=UTC, ts=1700000000) Zend VM
XSD_GYEAR 2023Z 1700000000
XSD_GYEARMONTH 2023-11Z 1700000000
XSD_GMONTHDAY --11-14Z 1700000000
XSD_GDAY ---14Z 1700000000
XSD_GMONTH --11--Z 1700000000

php-src reference

PHP implementation target

  • ext/soap/VmSoapClient.php — datetime-ex helper covers g* formats
  • Repro + compliance under test/compliance/cases/stdlib/

Repro

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php test/repro/issue_soapvar_xsd_gyear_family.php'

Done when

  • All five XSD_G* UTC timestamps match Zend table above on VM
  • Compliance .phpt guard
  • php-src-strict

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:vmVirtual machinebugSomething isn't workingimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions