Skip to content

[MOB-15894] Format Experience Event timestamps in UTC with millisecond precision#235

Merged
kevinlind merged 4 commits intoadobe:devfrom
kevinlind:mob-15894
Mar 24, 2022
Merged

[MOB-15894] Format Experience Event timestamps in UTC with millisecond precision#235
kevinlind merged 4 commits intoadobe:devfrom
kevinlind:mob-15894

Conversation

@kevinlind
Copy link
Copy Markdown
Contributor

Description

Use AEPServices Date+Format to format Experience Event timestamps as ISO 8601 dates in UTC with millisecond precision.
Add deprecated warning to XDMFormatters functions with message to use Date+Format instead.

IMPORTANT: Changed AEPCore location in Podfile to use Git branch dev-v3.4.3. The Podfile will need to be updated once AEPCore production is released but before AEPEdge is released.

Screen Shot 2022-03-21 at 1 18 51 PM

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@kevinlind kevinlind requested review from addb and emdobrin March 21, 2022 20:24
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 21, 2022

Codecov Report

Merging #235 (b31d19b) into dev (99e006e) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              dev     #235   +/-   ##
=======================================
  Coverage   94.48%   94.48%           
=======================================
  Files          27       27           
  Lines         979      979           
=======================================
  Hits          925      925           
  Misses         54       54           

@kevinlind kevinlind requested a review from timkimadobe March 21, 2022 23:23
Copy link
Copy Markdown
Contributor

@emdobrin emdobrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please also update the XDMFormatters usages in the test apps, test schemas and any other occurrences?

/// - Date: A timestamp and it must not be null
/// - Returns: The timestamp formatted to a string in the format of 'yyyy-MM-dd'T'HH:mm:ssXXX',
/// or an empty string if Date is null
@available(*, deprecated, message: "Use function getISO8601UTCDateWithMilliseconds() in Date class extension from AEPServices module instead.")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems ok to me. I wish we could have used the renamed attribute here but the usage is slightly different and in a different module.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I played around with renamed but it appears the method needs to be in the same class as that of the deprecated. Plus, as you said, the replacement is an extension to Date and not a utility function, so the usage is different.
There's also the obsoleted tag, but it appears that applies to either a Swift or iOS version, and not the SDK version, so that doesn't make much sense to use in this case.

@kevinlind kevinlind merged commit a2aa820 into adobe:dev Mar 24, 2022
@kevinlind kevinlind deleted the mob-15894 branch March 24, 2022 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants