python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
How do we get a time duration in C++ since a given year?
How do we get a time duration in C++ since a given year?
Can we do it with ctime or should we use chrono as well?

christo
Votes: 0
Answers: 2
Create std::chrono::zoned_time from zone and time
I have a datetime in a platonic sense, i.e some date and time (like 18th of January 2022 15:15:00) and I know in which timezone it represent something, e.g "Europe/Moscow"
I want to create s...

RiaD
Votes: 0
Answers: 1
C# to C++: Convert C# Time calculation to C++ chrono
I've got the task to convert some C# code to C++ and I've problems with chrono. Goal is to round a time to a variable time span.
C#:
int iRoundTo = 30; // can be 45 or other variable value, not a cons...
Mighty
Votes: 0
Answers: 2
std::chrono::system_clock + now() to milliseconds and back different behavior
I'm a bit puzzled to find a portable way to convert milliseconds to std::chrono::system_time::time_point. I looks like the code :
https://godbolt.org/z/e7Pr3oxMT
#include <chrono>
#include <i...
drus
Votes: 0
Answers: 1