| 112 | } |
| 113 | |
| 114 | std::string getChineseZodiac() |
| 115 | { |
| 116 | time_t current_time = time(nullptr); |
| 117 | int year = DateLUT::instance().toYear(current_time); |
| 118 | |
| 119 | // Traditional Chinese Zodiac |
| 120 | static constexpr const char * zodiacs[12] = { |
| 121 | "鼠", "牛", "虎", "兔", "龙", "蛇", |
| 122 | "马", "羊", "猴", "鸡", "狗", "猪" |
| 123 | }; |
| 124 | |
| 125 | //2020 is Rat |
| 126 | int offset = (year - 2020) % 12; |
| 127 | if (offset < 0) |
| 128 | offset += 12; |
| 129 | |
| 130 | return zodiacs[offset]; |
| 131 | } |
| 132 | |
| 133 | bool isCloudEndpoint(const std::string & host) |
| 134 | { |