| Index: src/ports/SkTime_Unix.cpp
|
| diff --git a/src/ports/SkTime_Unix.cpp b/src/ports/SkTime_Unix.cpp
|
| index 6e305a16f6eb8073e393e1d5d8629826035daaab..2d5fa279b468152cdbd8249764e0a6c29c73fd1f 100644
|
| --- a/src/ports/SkTime_Unix.cpp
|
| +++ b/src/ports/SkTime_Unix.cpp
|
| @@ -16,11 +16,15 @@ void SkTime::GetDateTime(DateTime* dt)
|
| {
|
| if (dt)
|
| {
|
| + tzset(); // initialize timezone variable;
|
| time_t m_time;
|
| time(&m_time);
|
| struct tm* tstruct;
|
| tstruct = localtime(&m_time);
|
| + int offset = tstruct->tm_isdst == 1 ? 60 : 0;
|
| +
|
| // http://pubs.opengroup.org/onlinepubs/009695399/basedefs/time.h.html
|
| + dt->fTimeZoneMinutes = SkToS16(offset - timezone / 60);
|
| dt->fYear = tstruct->tm_year + 1900;
|
| dt->fMonth = SkToU8(tstruct->tm_mon + 1);
|
| dt->fDayOfWeek = SkToU8(tstruct->tm_wday);
|
|
|