c894d1868e
* update copyrights of locale backend files Multibyte-support has been rewritten to use ICU as backend. While this does not necessarily work properly in every aspect (e.g. the shell still has [different] problems with multibyte- characters now), it does fix #6263 and #7700.
55 lines
1.1 KiB
C++
55 lines
1.1 KiB
C++
/*
|
|
* Copyright 2010-2011, Oliver Tappe, zooey@hirschkaefer.de.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _ICU_TIME_CONVERSION_H
|
|
#define _ICU_TIME_CONVERSION_H
|
|
|
|
|
|
#include <time.h>
|
|
|
|
#include <StorageDefs.h>
|
|
|
|
#include "ICUTimeData.h"
|
|
#include "LocaleBackend.h"
|
|
|
|
|
|
namespace BPrivate {
|
|
namespace Libroot {
|
|
|
|
|
|
class ICUTimeConversion {
|
|
public:
|
|
ICUTimeConversion(const ICUTimeData& timeData);
|
|
virtual ~ICUTimeConversion();
|
|
|
|
virtual void Initialize(
|
|
TimeConversionDataBridge* dataBridge);
|
|
|
|
status_t TZSet(const char* timeZoneID, const char* tz);
|
|
|
|
status_t Localtime(const time_t* inTime,
|
|
struct tm* tmOut);
|
|
status_t Gmtime(const time_t* inTime, struct tm* tmOut);
|
|
|
|
status_t Mktime(struct tm* inOutTm, time_t& timeOut);
|
|
|
|
private:
|
|
status_t _FillTmValues(const TimeZone* icuTimeZone,
|
|
const time_t* inTime, struct tm* tmOut);
|
|
|
|
const ICUTimeData& fTimeData;
|
|
|
|
TimeConversionDataBridge* fDataBridge;
|
|
|
|
TimeZone* fTimeZone;
|
|
char fTimeZoneID[B_FILE_NAME_LENGTH];
|
|
};
|
|
|
|
|
|
} // namespace Libroot
|
|
} // namespace BPrivate
|
|
|
|
|
|
#endif // _ICU_TIME_BACKEND_H
|