KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am just new to <time.h> and have a question regarding to time_t and time() . I read the function time() documented as follows: time_t time ( time_t * timer ); Get current time Get the current calendar time as a time_t object. The function returns this value, and if the argument is not a null pointer, the value is also set to the object pointed by timer. The documentation does not talk about time zone. Thus, for the following C++ code: time_t t = time(NULL); If two machines, one in US and the other one in UK, both execute the function call time(NULL) at the same time, will the returned time_t objects be identical? Will time() returns a value regardless of time zone?
Tags (comma-separated)
Save Edits
Cancel