diff options
author | Romain Guy <romainguy@android.com> | 2009-11-11 17:39:42 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2009-11-11 17:39:42 -0800 |
commit | 28ffcc4bb20c77eaced571aa2293f485e9935240 (patch) | |
tree | b05f94f7c7aa071acc0f76abfb735000a32a0db3 /libs/rs | |
parent | 5892b68f083b955eee4c74408708640b2dcbe6d7 (diff) | |
parent | e614f9382799826ca11960eb8ffacb677e2a2b1b (diff) | |
download | frameworks_base-28ffcc4bb20c77eaced571aa2293f485e9935240.zip frameworks_base-28ffcc4bb20c77eaced571aa2293f485e9935240.tar.gz frameworks_base-28ffcc4bb20c77eaced571aa2293f485e9935240.tar.bz2 |
am e614f938: am dac92e6f: am 3e584fc9: Merge change I5975651f into eclair
Merge commit 'e614f9382799826ca11960eb8ffacb677e2a2b1b'
* commit 'e614f9382799826ca11960eb8ffacb677e2a2b1b':
Don't feed the timezone to RenderScript time functions, let the library figure it out.
Diffstat (limited to 'libs/rs')
-rw-r--r-- | libs/rs/rsScriptC_Lib.cpp | 73 |
1 files changed, 18 insertions, 55 deletions
diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp index 5aef56d..23888ff 100644 --- a/libs/rs/rsScriptC_Lib.cpp +++ b/libs/rs/rsScriptC_Lib.cpp @@ -28,7 +28,6 @@ #include <GLES/glext.h> #include <time.h> -#include <cutils/tztime.h> using namespace android; using namespace android::renderscript; @@ -444,15 +443,9 @@ static int32_t SC_second() time_t rawtime; time(&rawtime); - if (sc->mEnviroment.mTimeZone) { - struct tm timeinfo; - localtime_tz(&rawtime, &timeinfo, sc->mEnviroment.mTimeZone); - return timeinfo.tm_sec; - } else { - struct tm *timeinfo; - timeinfo = localtime(&rawtime); - return timeinfo->tm_sec; - } + struct tm *timeinfo; + timeinfo = localtime(&rawtime); + return timeinfo->tm_sec; } static int32_t SC_minute() @@ -462,15 +455,9 @@ static int32_t SC_minute() time_t rawtime; time(&rawtime); - if (sc->mEnviroment.mTimeZone) { - struct tm timeinfo; - localtime_tz(&rawtime, &timeinfo, sc->mEnviroment.mTimeZone); - return timeinfo.tm_min; - } else { - struct tm *timeinfo; - timeinfo = localtime(&rawtime); - return timeinfo->tm_min; - } + struct tm *timeinfo; + timeinfo = localtime(&rawtime); + return timeinfo->tm_min; } static int32_t SC_hour() @@ -480,15 +467,9 @@ static int32_t SC_hour() time_t rawtime; time(&rawtime); - if (sc->mEnviroment.mTimeZone) { - struct tm timeinfo; - localtime_tz(&rawtime, &timeinfo, sc->mEnviroment.mTimeZone); - return timeinfo.tm_hour; - } else { - struct tm *timeinfo; - timeinfo = localtime(&rawtime); - return timeinfo->tm_hour; - } + struct tm *timeinfo; + timeinfo = localtime(&rawtime); + return timeinfo->tm_hour; } static int32_t SC_day() @@ -498,15 +479,9 @@ static int32_t SC_day() time_t rawtime; time(&rawtime); - if (sc->mEnviroment.mTimeZone) { - struct tm timeinfo; - localtime_tz(&rawtime, &timeinfo, sc->mEnviroment.mTimeZone); - return timeinfo.tm_mday; - } else { - struct tm *timeinfo; - timeinfo = localtime(&rawtime); - return timeinfo->tm_mday; - } + struct tm *timeinfo; + timeinfo = localtime(&rawtime); + return timeinfo->tm_mday; } static int32_t SC_month() @@ -516,15 +491,9 @@ static int32_t SC_month() time_t rawtime; time(&rawtime); - if (sc->mEnviroment.mTimeZone) { - struct tm timeinfo; - localtime_tz(&rawtime, &timeinfo, sc->mEnviroment.mTimeZone); - return timeinfo.tm_mon; - } else { - struct tm *timeinfo; - timeinfo = localtime(&rawtime); - return timeinfo->tm_mon; - } + struct tm *timeinfo; + timeinfo = localtime(&rawtime); + return timeinfo->tm_mon; } static int32_t SC_year() @@ -534,15 +503,9 @@ static int32_t SC_year() time_t rawtime; time(&rawtime); - if (sc->mEnviroment.mTimeZone) { - struct tm timeinfo; - localtime_tz(&rawtime, &timeinfo, sc->mEnviroment.mTimeZone); - return timeinfo.tm_year; - } else { - struct tm *timeinfo; - timeinfo = localtime(&rawtime); - return timeinfo->tm_year; - } + struct tm *timeinfo; + timeinfo = localtime(&rawtime); + return timeinfo->tm_year; } static int32_t SC_uptimeMillis() |