Can you explain me how to get local timestamp in C++.
Jump to Post
see the functions in time.h -- such as time(0) will return the current time in seconds since 1970 (or something like that). Then localtime() will convert it to a structure tm. There is also a gmtime() that converts the time(0) to GMT instead of local time.
All 5 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.