C++ 检查历元时间戳是否在c+中给定的人类可读时间范围内+;

C++ 检查历元时间戳是否在c+中给定的人类可读时间范围内+;,c++,epoch,C++,Epoch,我有一个 uint64_t ts=1523613515992249788 std::string t1; std::string t2; //example t1="09:00",t2="15:30" t1和t2由用户给定,并由我的代码存储为std::string(这是HH:MM格式的人类可读时间) 上述ts是 格林尼治时间:2018年4月13日星期五09:58:35.992 IST:2018年4月13日星期五15:28:35.992 GMT+05:30 默认情况下,我假设t1和t2在IS

我有一个

uint64_t ts=1523613515992249788
std::string t1; std::string t2; //example t1="09:00",t2="15:30"
t1和t2由用户给定,并由我的代码存储为
std::string
(这是HH:MM格式的人类可读时间)

上述ts是

  • 格林尼治时间:2018年4月13日星期五09:58:35.992
  • IST:2018年4月13日星期五15:28:35.992 GMT+05:30
默认情况下,我假设t1和t2在IST中(作为命令行参数给出) 我正在尝试写一个如下的函数

bool isTSinRange(uint64_t ts) {
// how to make t1 t2 ts comparable and do the below
 if (t1<ts<t2)
  return true;
 else 
  return false; }
bool isTSinRange(uint64_t ts){
//如何使t1和t2具有可比性,并执行以下操作

如果你能详细说明你遇到的问题,是“人类可读”的解析问题吗价值观?在比较本身?其他东西?请学习如何创建一个。我也建议您阅读。是的,我修复了更多的标题clarity@pythonRcpp你仍然没有提到你的问题。你得到的错误是什么,或者你的问题是什么?我只想比较一下
isTSinRang中的
t1 t2 ts
e
函数,
t1 t2
是字符串,
ts
uint64\u t
现在清楚了吗?