More fixes for Gems

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-08-13 16:04:46 -07:00
parent e7f07147cb
commit 1d4c53a777
15 changed files with 48 additions and 29 deletions
@@ -55,7 +55,13 @@ namespace AWSMetrics
time_t now;
time(&now);
char buffer[50];
strftime(buffer, sizeof(buffer), "%FT%TZ", gmtime(&now));
tm time;
#if AZ_TRAIT_USE_SECURE_CRT_FUNCTIONS
gmtime_s(&time, &now);
#else
time = *gmtime(&now);
#endif
strftime(buffer, sizeof(buffer), "%FT%TZ", &time);
m_currentMetricsEvent.AddAttribute(MetricsAttribute(AwsMetricsAttributeKeyEventTimestamp, AZStd::string(buffer)));
}