Home | History | Annotate | Download | only in utils
      1 /* Copyright (C) 2007-2008 The Android Open Source Project
      2 **
      3 ** This software is licensed under the terms of the GNU General Public
      4 ** License version 2, as published by the Free Software Foundation, and
      5 ** may be copied, distributed, and modified under those terms.
      6 **
      7 ** This program is distributed in the hope that it will be useful,
      8 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
      9 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     10 ** GNU General Public License for more details.
     11 */
     12 #ifndef _ANDROID_UTILS_TIMEZONE_H
     13 #define _ANDROID_UTILS_TIMEZONE_H
     14 
     15 #include "android/utils/compiler.h"
     16 
     17 ANDROID_BEGIN_HEADER
     18 
     19 /* try to set the default host timezone, returns 0 on success, or -1 if
     20  * 'tzname' is not in zoneinfo format (e.g. Area/Location)
     21  */
     22 extern int  timezone_set( const char*  tzname );
     23 
     24 /* append the current host "zoneinfo" timezone name to a given buffer. note
     25  * that this is something like "America/Los_Angeles", and not the human-friendly "PST"
     26  * this is required by the Android emulated system...
     27  *
     28  * the implementation of this function is really tricky and is OS-dependent
     29  * on Unix systems, it needs to cater to the TZ environment variable, uhhh
     30  *
     31  * if TZ is defined to something like "CET" or "PST", this will return the name "Unknown/Unknown"
     32  */
     33 extern char*  bufprint_zoneinfo_timezone( char*  buffer, char*  end );
     34 
     35 ANDROID_END_HEADER
     36 
     37 #endif /* _ANDROID_UTILS_TIMEZONE_H */
     38