C++ - Date and Time

preview_player
Показать описание
C++ - Date and Time
Lecture By: Mr. Arnab Chakraborty, Tutorials Point India Private Limited
Рекомендации по теме
Комментарии
Автор

Use coupon “YOUTUBE 12” to get “FLAT 12%” OFF at checkout

TutorialsPoint_
Автор

This is really excellent. Just what I needed to know. Thanks.

thebudkellyfiles
Автор

Hey bro, i got a Problem.

When i increase the time (Hour or Minute), when the time increased up to 23:59 the next time of increased can be 26:00, should the time is change to 03:00 when over 23:59. How to fix this???

erikandribudiman
Автор

thank you so much sir, but i facing a problem how we increase the UTC, By 5 or 5:30

muhammadarsalan
Автор

Very detailed and clearly explained, thanks!

yelu
Автор

The problem I have found is that the ctime library is not longer acceptable, but there is not a suitable alternative. When you try to print a time_t type object by doing std::cout << ctime(&std::time_t), the compiler gives you a warning. This is because the ctime library is not longer safe, and there are some exceptions that go unchecked. The alternative solution should be the chrono library, that has some nice features, but when trying to print to the console you must still go through ctime. What a goof, they state ctime is not safe, and yet give not suitable alternative. DOES ANYONE NOW HOW TO PRINT THE TIME USING CHRONO ONLY?

DiegoPerez-eivb
Автор

code give following error.
Error C4996 'ctime': This function or variable may be unsafe. Consider using ctime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. SystemTime c:\users\abdullah 8

My Code:
#include<iostream>
#include<ctime>
using namespace std;
int main()
{
time_t now = time(0);
char *time = ctime(&now);
cout << "Time of System is: " << time << endl;
system("pause");
return 0;
}

dontvisitthischannel
Автор

nice but more detailed example needed;

abhinavabhi
Автор

all Laude, but if Conventions about Date and Time will Change we need to change all !

ionmurgu