Yes, though I'm not totally sure exactly what you're asking here. If you mean, that you have a string like "YYYY-mm-dd HH:MM:SS" and that string represents a civil time in, say, America/Chicago[1], and you'd like to see the corresponding time in UTC, you can do something like the following (untested):
std::optional<std::string> convert(const std::string& fmt,
const std::string& input,
cctz::time_zone tz_from,
cctz::time_zone tz_to) {
std::chrono::system_clock::time_point tp;
if (!cctz::parse(fmt, input, tz_from, &tp)) return std::nullopt;
return cctz::format(fmt, tp, tz_to);
}
int main() {
cctz::time_zone central_tz;
if (!cctz::load_time_zone("America/Chicago", ¢ral_tz)) return 1;
auto out = convert("%Y-%m-%d %H:%M:%S", "2018-10-01 01:02:03", central_tz,
cctz::utc_time_zone());
if (!out) return 1;
std::cout << "Converted time is: " << *out << '\n';
}
[1]: Note that "CST" is not a time-zone identifier. If you mean America/Chicago, use that identifier instead.