有没有办法使用 Boost 获取区域时间格式?
Is there a way to get regional time format with Boost?
正如我试图在标题中询问的那样,我说的是区域时间格式。我有一个可以显示时间/日期的应用程序,但是从美国用户那里,我得到了为什么我像这样显示时间的问题:21:30而不是这个:晚上9:30。我将日期显示为22.05.2018而不是05.22.2018的日期也是如此。
所以我的问题是:有没有办法获取时区标志或位置,甚至是已经格式化的时间,以便我可以显示不同地区不同的时间/日期?
with boost locale
double now=time(0);
cout << as::datetime << as::local_time << "Local time is: "<< now << endl;
cout << as::gmt << "GMT Time is: "<< now <<endl;
cout << as::time_zone("EST") << "Eastern Standard Time is: "<< now <<endl;
从字符串中解析日期并添加时区
相关文章:
- C++为构建时间获取QDateTime的可靠方法
- 从持续时间构造std::chrono::system_clock::time_point
- 向量 <int> a {N, 0} 和 int arr a[N] = {0} 的时间复杂度有什么区别
- while循环中while循环的时间复杂度是多少
- 使用简单类型列表实现的指数编译时间.为什么
- 是否可以在编译时初始化数组,以便在运行时不会花费时间?
- 在已经使用Git的情况下减少编译时间
- 有没有一种方法可以创建一个带有哈希表的数据库,该哈希表具有恒定时间查找功能
- 如何将包含epoch时间的十六进制字符串转换为time_t
- 从文本文件中读取时钟时间和事件时间并进行处理
- 具有未知值时的时间复杂性
- 如何减少花费的时间
- C++在变量给定的指定时间内关闭电脑
- rcpp函数中的清理时间很长
- C++:floor unix时间戳到UTC月份
- 有没有办法使用 Boost 获取区域时间格式?
- C 将没有时区域区域区域的Postgres时间戳转换为Time_T
- 实现区域设置格式的时间输出
- 与时间相关的信息在我的区域设置中有上限吗
- Unix c++:获取不同区域的时间