1// Copyright (C) 2017 The Qt Company Ltd.
2// Copyright (C) 2015 Intel Corporation.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef QTENVIRONMENTVARIABLES_P_H
6#define QTENVIRONMENTVARIABLES_P_H
7// Nothing but (tests and) ../time/qlocaltime.cpp should access this.
8#if defined(__cplusplus)
9
10//
11// W A R N I N G
12// -------------
13//
14// This file is not part of the Qt API. It exists purely as an implementation
15// detail. This header file may change from version to version without notice,
16// or even be removed.
17//
18// We mean it.
19//
20
21#include "qglobal_p.h"
22
23#ifdef Q_CC_MINGW
24# include <unistd.h> // Define _POSIX_THREAD_SAFE_FUNCTIONS to obtain localtime_r()
25#endif
26#include <time.h>
27
28QT_BEGIN_NAMESPACE
29
30// These (behave as if they) consult the environment, so need to share its locking:
31Q_CORE_EXPORT void qTzSet();
32Q_CORE_EXPORT time_t qMkTime(struct tm *when);
33Q_CORE_EXPORT bool qLocalTime(time_t utc, struct tm *local);
34Q_CORE_EXPORT QString qTzName(int dstIndex);
35
36QT_END_NAMESPACE
37
38#endif // defined(__cplusplus)
39#endif // QTENVIRONMENTVARIABLES_P_H
40

source code of qtbase/src/corelib/global/qtenvironmentvariables_p.h