blob: cf103cae5eccf82738b08e62b2bb333c143f5747 [file] [log] [blame]
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08001/*
2 * Copyright (C) 2006 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef _CUTILS_TZTIME_H
18#define _CUTILS_TZTIME_H
19
The Android Open Source Projectb1487e42009-03-18 22:20:28 -070020#include <time.h>
21
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080022#ifdef __cplusplus
23extern "C" {
24#endif
25
26time_t mktime_tz(struct tm * const tmp, char const * tz);
27void localtime_tz(const time_t * const timep, struct tm * tmp, const char* tz);
28
The Android Open Source Projectb1487e42009-03-18 22:20:28 -070029#ifndef HAVE_ANDROID_OS
30/* the following is defined in <time.h> in Bionic */
31
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080032struct strftime_locale {
33 const char *mon[12]; /* short names */
34 const char *month[12]; /* long names */
Eric Fischer722a5c02009-05-12 16:26:16 -070035 const char *standalone_month[12]; /* long standalone names */
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080036 const char *wday[7]; /* short names */
37 const char *weekday[7]; /* long names */
38 const char *X_fmt;
39 const char *x_fmt;
40 const char *c_fmt;
41 const char *am;
42 const char *pm;
43 const char *date_fmt;
44};
45
46size_t strftime_tz(char *s, size_t max, const char *format, const struct tm *tm, const struct strftime_locale *locale);
47
The Android Open Source Projectb1487e42009-03-18 22:20:28 -070048#endif /* !HAVE_ANDROID_OS */
49
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080050#ifdef __cplusplus
51}
52#endif
53
54#endif /* __CUTILS_TZTIME_H */
55