-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is this function designed intentionally? boost::date_time::c_time::gmtime doesn't touch the result pointer passed. #199
Comments
Any one? |
I'm not sure what the confusion is. The function calls gmtime to assign the result pointer and then returns it? Also this is really an implementation detail of the library, so not really part of the documented api. |
the content of the 2nd argument (pointer result) passed to the function will not change; |
That changes it. |
I am sorry, and confused. if you want to change this pointer, you need to
|
@fragrans This is a C++03-compatible library so @JeffGarland if you look in date_clock_device.hpp, the implementation is passed a std::tm& but that is never filled in, and the returned std::tm* is going to be different than what was passed in for result. It does seem a bit confusing and likely a bug as there could be other bad assumptions made by consumers about get_local_time and get_universal_time based on the inputs. |
inline static std::tm* gmtime(const std::time_t* t, std::tm* result);
I assume this function will change the result pointer by filling the struct; but it doesn't;
Windows 10; MSVC 16.11.7
date_time/include/boost/date_time/c_time.hpp
Lines 109 to 120 in 7156392
The text was updated successfully, but these errors were encountered: