Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
3 votes
3 answers
220 views

2038 is coming...I have to think date time in 64 bit! I'm trying to understand how to do this in C++, with chrono library, but I'm failing miserably so far. I will have to communicate a date time ...
0 votes
2 answers
413 views

I have an assignment for my C++ class that is mostly complete. However, I am unsure as to how I am supposed to make the program display the days of the current month. I'm able to make it work with ...
0 votes
1 answer
76 views

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> struct aracbilgiturleri { char Plaka[50]; //licanse plate char ...
1 vote
2 answers
133 views

I have a rather large c-code base, where every once in a while int is used instead of time_t. Any good ideas as to how to deal with this. Should I search the entire standard library for functions that ...
0 votes
1 answer
202 views

I have a program I'm writing to take inputs from the command line or a file with the format: 9999.365 --> Fri 31 Dec 9999 Where the output needs to look like the second part of that example. I'm ...
2 votes
1 answer
58 views

Using below function, which simply adds days to date (yyyymmdd), works fine throughout years. int dateplusdays(int datein, int days) { int year, month, day; int dateout; struct tm date; ...
geohei's user avatar
  • 880
3 votes
2 answers
2k views

I have a string representing seconds since epoch, and I need to convert it to a human readable string. I've seen a few posts online that suggest simply casting an integer to time_t as so: time_t time ...
HardcoreHenry's user avatar
0 votes
1 answer
55 views

I'd like to understand better time_t since i've never dealt with it before. I want to make a filter_by_time function that gets a time window (lets say, 24 hours) and sends me back a vector of objects ...
0 votes
0 answers
278 views

Hey I'm having trouble coding the following: I want to get the creationdate of a file by processid and I did it like so: TCHAR Buffer[MAX_PATH]; if (GetModuleFileNameEx(Handle, 0, Buffer, MAX_PATH)) { ...
1 vote
2 answers
598 views

I'm trying to find the best way to see if the current time is before a specified time. Say I want to see if it's before 14:32. What's the best way to do this in C++? Ideally I'd be able to build some ...
0 votes
0 answers
75 views

Why is forward conversion from time_t, equaled to 1, to tm valid, whereas backward is not? #include <ctime> #include <map> using namespace std; int main() { time_t timer = 1; tm *...
Max Popov's user avatar
  • 416
1 vote
2 answers
885 views

I need to find the time difference between two given dates. I have tried the following code but not able to convert it into hours mins secs const char *time_details = "06/10/2021 16:35:...
1 vote
0 answers
2k views

I'm trying to port my 32-bit ARM architecture to 64-bit time values. Reading the answers from 64-bit time_t in Linux Kernel it tells me the following: All user space must be compiled with a 64-bit ...
0 votes
1 answer
780 views

I have a chunk of code where I am trying to convert the string time into time_t and then use the difftime() method to do a comparison. However, currently, the difftime returns 0 instead of the number ...
1 vote
1 answer
185 views

I'm trying to write a program that takes some song data (~1000 lines) from a CSV file and puts it into a struct array. Each line from that CSV file contains: title of the song, artist and release year....

15 30 50 per page
1
2 3 4 5
...
12

AltStyle によって変換されたページ (->オリジナル) /