~aleteoryx/muditaos

ref: b4568c32eb2a4b37e9dfbbe08c446430eee2145c muditaos/module-services/service-time/api/TimeSettingsApi.cpp -rw-r--r-- 1.1 KiB
b4568c32 — Kuba Kleczkowski [MOS-977] Added VoLTE support in additional countries 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "TimeSettingsApi.hpp"
#include <internal/StaticData.hpp>

#include <time/time_locale.hpp>

namespace stm::api
{
    bool isAutomaticDateAndTime()
    {
        return stm::internal::StaticData::get().getAutomaticDateAndTime();
    }

    utils::time::Locale::DateFormat dateFormat()
    {
        return stm::internal::StaticData::get().getDateFormat();
    }

    utils::time::Locale::TimeFormat timeFormat()
    {
        return stm::internal::StaticData::get().getTimeFormat();
    }
    bool isTimeFormat12h()
    {
        return stm::internal::StaticData::get().getTimeFormat() == utils::time::Locale::TimeFormat::FormatTime12H;
    }
    const std::string getCurrentTimezoneName()
    {
        return stm::internal::StaticData::get().getCurrentTimezoneName();
    }
    const std::string getCurrentTimezoneRules()
    {
        return stm::internal::StaticData::get().getCurrentTimezoneRules();
    }
} // namespace stm::api