Skip to content

CREATED and LAST_UPDATED are not getting set #51

@aagrawal207

Description

@aagrawal207

Hi all,

I am trying to encode to a GPP string using this code:

gppModel.setFieldValue(TcfEuV2.NAME, TcfEuV2Field.VERSION, 2);
gppModel.setFieldValue(TcfEuV2.NAME, TcfEuV2Field.CMP_ID, consentData.getCmpId());
gppModel.setFieldValue(TcfEuV2.NAME, TcfEuV2Field.CMP_VERSION, consentData.getCmpVersion());
gppModel.setFieldValue(TcfEuV2.NAME, TcfEuV2Field.CONSENT_SCREEN, consentData.getConsentScreenID());
gppModel.setFieldValue(TcfEuV2.NAME, TcfEuV2Field.CONSENT_LANGUAGE, consentData.getConsentLanguage());
gppModel.setFieldValue(TcfEuV2.NAME, TcfEuV2Field.VENDOR_LIST_VERSION,
        gvlSettings.getGvlVendorListVersion());
gppModel.setFieldValue(TcfEuV2.NAME, TcfEuV2Field.POLICY_VERSION, gvlSettings.getGvlTcfPolicyVersion());
gppModel.setFieldValue(TcfEuV2.NAME, TcfEuV2Field.IS_SERVICE_SPECIFIC, consentData.isIsServiceSpecific());
gppModel.setFieldValue(TcfEuV2.NAME, TcfEuV2Field.USE_NON_STANDARD_STACKS,
        consentData.isShouldUseNonStandardStacks());
gppModel.setFieldValue(TcfEuV2.NAME, TcfEuV2Field.PURPOSE_ONE_TREATMENT,
        consentData.isPurposeOneTreatment());
gppModel.setFieldValue(TcfEuV2.NAME, TcfEuV2Field.PUBLISHER_COUNTRY_CODE,
        consentData.getPublisherCountryCode());
gppModel.setFieldValue(TcfEuV2.NAME, TcfEuV2Field.CREATED,
        ZonedDateTime.of(2024, 1, 1, 0, 0, 0, 0, ZoneId.of("UTC")));
gppModel.setFieldValue(TcfEuV2.NAME, TcfEuV2Field.LAST_UPDATED,
        ZonedDateTime.of(2024, 1, 1, 0, 0, 0, 0, ZoneId.of("UTC")));

For the consent that I am providing, I am getting following string:

DBABMA~CQBE28AQBE28ADIABCDEAbEgAP4AAAAAABagHmABIAJEaSFgIXB1QCMAEYAURBgBAAAgBAAAACAAAAIAIAACEGAQIAQAACACEAAAAAIBAAAgAAAAAUAAQAAAAABAAAAAAAAAICAAAAAAAAAAAAAgAAAAAAAAgAAAAAAAiABAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAA.YAAAAAAAAAAA

In this string, the creation and last updated date is always the current date instead of the date I am providing. What am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    investigateTo validate if still an issuereviewedFor library maintainers only. Indicates that this issue was reviewed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions