Remove localtime_tz and strftime_tz.

This also brings our copy of strftime.c much closer to upstream, though
we still have several GNU extensions and hacks to deal with Android32's
broken time_t.

Bug: 15765976
Change-Id: Ic9ef36e8acd3619504ecc4d73feec2b61fd4dfa1
This commit is contained in:
Elliott Hughes
2014-07-25 15:50:31 -07:00
parent 50a9630cc2
commit 39d903aea9
2 changed files with 41 additions and 124 deletions

View File

@@ -2310,20 +2310,4 @@ __attribute__((visibility("default"))) time_t mktime_tz(struct tm* const tmp, co
return return_value;
}
// Non-standard API: localtime(3) but with an explicit timezone parameter.
#if !defined(__LP64__)
__attribute__((visibility("default"))) void localtime_tz(const time_t* const timep, struct tm* tmp, const char* tz) {
struct state* st = malloc(sizeof(*st));
if (st == NULL)
return;
if (__bionic_tzload_cached(tz, st, TRUE) != 0) {
// TODO: not sure what's best here, but for now, we fall back to gmt.
gmtload(st);
}
localsub(timep, 0L, tmp, st);
free(st);
}
#endif
// END android-added