2 * Copyright 2010-2011, Oliver Tappe, zooey@hirschkaefer.de.
3 * Distributed under the terms of the MIT License.
5 #ifndef _ICU_TIME_CONVERSION_H
6 #define _ICU_TIME_CONVERSION_H
11 #include <StorageDefs.h>
13 #include "ICUTimeData.h"
14 #include "LocaleBackend.h"
21 class ICUTimeConversion
{
23 ICUTimeConversion(const ICUTimeData
& timeData
);
24 virtual ~ICUTimeConversion();
26 virtual void Initialize(
27 TimeConversionDataBridge
* dataBridge
);
29 status_t
TZSet(const char* timeZoneID
, const char* tz
);
31 status_t
Localtime(const time_t* inTime
,
33 status_t
Gmtime(const time_t* inTime
, struct tm
* tmOut
);
35 status_t
Mktime(struct tm
* inOutTm
, time_t& timeOut
);
38 status_t
_FillTmValues(const TimeZone
* icuTimeZone
,
39 const time_t* inTime
, struct tm
* tmOut
);
41 const ICUTimeData
& fTimeData
;
43 TimeConversionDataBridge
* fDataBridge
;
46 char fTimeZoneID
[B_FILE_NAME_LENGTH
];
50 } // namespace Libroot
51 } // namespace BPrivate
54 #endif // _ICU_TIME_BACKEND_H