Chromium Code Reviews| Index: base/third_party/nspr/prtime.cc |
| diff --git a/base/third_party/nspr/prtime.cc b/base/third_party/nspr/prtime.cc |
| index f1fcf26cd81842765477a38a90e0f8ceeb58187e..5b7826984d7a4bdfa075dbc75b51851ba1beff7a 100644 |
| --- a/base/third_party/nspr/prtime.cc |
| +++ b/base/third_party/nspr/prtime.cc |
| @@ -71,6 +71,9 @@ |
| #include <windows.h> |
| #elif defined(OS_MACOSX) |
| #include <CoreFoundation/CoreFoundation.h> |
| +#elif defined(OS_ANDROID) |
| +#include <ctype.h> |
| +#include "base/time.h" // For timegm() |
|
brettw
2011/08/24 20:46:58
I'm surprised you have to include Chrome's time.h
michaelbai
2011/08/24 23:02:18
Sorry, it seemed I should upload more files, timeg
|
| #endif |
| #include <errno.h> /* for EINVAL */ |
| #include <time.h> |
| @@ -138,10 +141,10 @@ PR_ImplodeTime(const PRExplodedTime *exploded) |
| gregorian_date.minute = exploded->tm_min; |
| gregorian_date.second = exploded->tm_sec; |
| - // Compute |absolute_time| in seconds, correct for gmt and dst |
| + // Compute |absolute_time| in seconds, correct for gmt and dst |
| // (note the combined offset will be negative when we need to add it), then |
| // convert to microseconds which is what PRTime expects. |
| - CFAbsoluteTime absolute_time = |
| + CFAbsoluteTime absolute_time = |
| CFGregorianDateGetAbsoluteTime(gregorian_date, NULL); |
| PRTime result = static_cast<PRTime>(absolute_time); |
| result -= exploded->tm_params.tp_gmt_offset + |