Question: (current_time.cpp) The timeO) function in the ctime header file, returns the current time in seconds elapsed since the time 00:00:00 on January 1, 1970 GMT.

 (current_time.cpp) The timeO) function in the ctime header file, returns the

(current_time.cpp) The timeO) function in the ctime header file, returns the current time in seconds elapsed since the time 00:00:00 on January 1, 1970 GMT. This time is known as the UNIX epoch. You can use this function to obtain the current time, and then compute the current second, minute, and hour. Please do your own calculations instead of using pre-defined members of time_t. After accomplishing the above, prompts the user to enter the time zone offset to GMT and displays the time in the specified time zone. Assume input is correct. Write a C++ program that obtains the current time using time(0) and calculates and displays the current second, minute, and hour. Here is a sample run: Current time is 17:40:34 GMT Enter the time zone offset to GMT: -5 The current time in your time zone is 12:40:34

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!