mirror of
https://review.haiku-os.org/haiku
synced 2025-02-03 04:07:18 +01:00
dbe1e23aa8
* _kern_[sg]et_timezone() now accepts/passes out the timezone name, too * adjust Time preflet and clockconfig to pass the timezone name into the kernel when calling _kern_set_timezone() * ajust implementation of tzset() to fetch the timezone name from the kernel via _kern_get_timezone() instead of reading 'libroot_timezone_info' * the Time preflet no longer writes 'libroot_timezone_info' git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38164 a95241bf-73f2-0310-859d-f6bbb57e9c96
52 lines
1.0 KiB
C++
52 lines
1.0 KiB
C++
/*
|
|
* Copyright 2010, 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 {
|
|
|
|
|
|
class ICUTimeConversion {
|
|
public:
|
|
ICUTimeConversion(const ICUTimeData& timeData);
|
|
virtual ~ICUTimeConversion();
|
|
|
|
virtual void Initialize(
|
|
TimeConversionDataBridge* dataBridge);
|
|
|
|
status_t TZSet(const char* timeZoneID);
|
|
|
|
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;
|
|
|
|
char fTimeZoneID[B_FILE_NAME_LENGTH];
|
|
};
|
|
|
|
|
|
} // namespace BPrivate
|
|
|
|
|
|
#endif // _ICU_TIME_BACKEND_H
|