summaryrefslogtreecommitdiffstats
path: root/camera/OMXCameraAdapter/OMXExif.cpp
diff options
context:
space:
mode:
authorTyler Luu <tluu@ti.com>2011-09-19 14:02:58 -0500
committerIliyan Malchev <malchev@google.com>2011-09-19 22:32:33 -0700
commita57a179f8007cd960fb0b77fc55ed1ee85147044 (patch)
tree4a588b259bbd01e4bc6cbdc14aba38ff41604e17 /camera/OMXCameraAdapter/OMXExif.cpp
parent7b4990d47f1765a2264cdf925730e486791c2d1c (diff)
downloadhardware_ti_omap4xxx-a57a179f8007cd960fb0b77fc55ed1ee85147044.zip
hardware_ti_omap4xxx-a57a179f8007cd960fb0b77fc55ed1ee85147044.tar.gz
hardware_ti_omap4xxx-a57a179f8007cd960fb0b77fc55ed1ee85147044.tar.bz2
CameraHal: Use gmtime for Exif
Previously, we were using localtime instead of gmtime for exif timestamps and datestamps. b/5314200 Change-Id: I3e83b05a3fb5dacce0b29a5b4f99bb27a14ad2c3 Signed-off-by: Tyler Luu <tluu@ti.com>
Diffstat (limited to 'camera/OMXCameraAdapter/OMXExif.cpp')
-rw-r--r--camera/OMXCameraAdapter/OMXExif.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/camera/OMXCameraAdapter/OMXExif.cpp b/camera/OMXCameraAdapter/OMXExif.cpp
index 5da60ac..af50a39 100644
--- a/camera/OMXCameraAdapter/OMXExif.cpp
+++ b/camera/OMXCameraAdapter/OMXExif.cpp
@@ -125,7 +125,7 @@ status_t OMXCameraAdapter::setParametersEXIF(const CameraParameters &params,
if( (valstr = params.get(CameraParameters::KEY_GPS_TIMESTAMP)) != NULL )
{
long gpsTimestamp = strtol(valstr, NULL, 10);
- struct tm *timeinfo = localtime( ( time_t * ) & (gpsTimestamp) );
+ struct tm *timeinfo = gmtime( ( time_t * ) & (gpsTimestamp) );
if ( NULL != timeinfo )
{
mEXIFData.mGPSData.mTimeStampHour = timeinfo->tm_hour;
@@ -146,7 +146,7 @@ status_t OMXCameraAdapter::setParametersEXIF(const CameraParameters &params,
if( ( valstr = params.get(CameraParameters::KEY_GPS_TIMESTAMP) ) != NULL )
{
long gpsDatestamp = strtol(valstr, NULL, 10);
- struct tm *timeinfo = localtime( ( time_t * ) & (gpsDatestamp) );
+ struct tm *timeinfo = gmtime( ( time_t * ) & (gpsDatestamp) );
if ( NULL != timeinfo )
{
strftime(mEXIFData.mGPSData.mDatestamp, GPS_DATESTAMP_SIZE, "%Y:%m:%d", timeinfo);
@@ -371,7 +371,7 @@ status_t OMXCameraAdapter::setupEXIF()
if ( OMX_TI_TagReadWrite == exifTags->eStatusDateTime )
{
int status = gettimeofday (&sTv, NULL);
- pTime = localtime (&sTv.tv_sec);
+ pTime = gmtime (&sTv.tv_sec);
if ( ( 0 == status ) && ( NULL != pTime ) )
{
snprintf(( char * ) sharedPtr, EXIF_DATE_TIME_SIZE,
@@ -562,7 +562,7 @@ status_t OMXCameraAdapter::setupEXIF_libjpeg(ExifElementsTable* exifTable)
if ((NO_ERROR == ret)) {
int status = gettimeofday (&sTv, NULL);
- pTime = localtime (&sTv.tv_sec);
+ pTime = gmtime (&sTv.tv_sec);
char temp_value[EXIF_DATE_TIME_SIZE + 1];
if ((0 == status) && (NULL != pTime)) {
snprintf(temp_value, EXIF_DATE_TIME_SIZE,