Skip to content

Conversation

JamesLebron
Copy link

@JamesLebron JamesLebron commented Jul 17, 2023

Submit found bugs

张钦 added 3 commits July 17, 2023 11:18
…example, after changing the AuthorizationKey, RpcBase::start will be called, but m_results_queue is not set to true. As a result, many inexplicable issues will occur for all subsequent requests.
…nConf. Here, value.find should be used to obtain the issued data.
…ducted in the UTC timezone, so it was difficult for you to discover this issue. If you are in another timezone, you will notice that the hour, minute, and second data will be lost. For example, in the time judgment of intelligent charging.
@c-jimenez
Copy link
Owner

Thanks for submitting these fixes, I will review them this week.

@c-jimenez c-jimenez changed the base branch from develop to fix/various_fixes July 24, 2023 07:48
@c-jimenez c-jimenez merged commit 518feb1 into c-jimenez:fix/various_fixes Jul 24, 2023
@c-jimenez
Copy link
Owner

Hi,

I won't take the fix concerning the DateTime object since it seems that it is working fine with other timezone than UTC.
A thing that you may have missed is that it always returns an ISO-8601 string for UTC time (ends with 'Z' timezone) not for local time, hence the use of the gmtime_r function and the computation of the time offset tm_gmtoff.

You may use this simple test program to convince yourself :

 int main()
{
    setenv("TZ", "EST5EDT", 1);
    tzset();
    std::cout << tzname[0] << std::endl;
    std::cout << tzname[1] << std::endl;
    
    DateTime now = DateTime::now();
    
    std::cout << now.str() << std::endl;
    
    DateTime now2;
    if (now2.assign(now.str()))
    {
        std::cout << now2.str() << std::endl;    
    }
    else
    {
        std::cout << "Oupsie!" << std::endl;
    }
}

@c-jimenez c-jimenez mentioned this pull request Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants