Показать сообщение отдельно
Старый 05.10.2016, 02:58   #2  
kashperuk is offline
kashperuk
Участник
Аватар для kashperuk
MCBMSS
Соотечественники
Сотрудники Microsoft Dynamics
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии 2011
Лучший по профессии 2009
 
4,361 / 2084 (78) +++++++++
Регистрация: 30.05.2004
Адрес: Atlanta, GA, USA
Цитата:
Сообщение от Blog bot Посмотреть сообщение
Источник: http://sashanazarov.blogspot.com/201...mdatetime.html
==============

After the current system date is changed, either from the user interface or via systemDateSet function, the DateTimeUtil::getSystemDateTime() goes out of control. Don't ever use this function for unique keys generation.

Unfortunately, they use it a lot in the DIXF.

static void printDateTimeJob(Args _args)
{
void printDateTime()
{
info(strFmt('systemDateGet: %1 %2',
systemDateGet(),
time2StrHMS(timeNow())));
info(strFmt('getSystemDateTime: %1', DateTimeUtil::getSystemDateTime()));
info(strFmt('utcNow: %1', DateTimeUtil::utcNow()));
}

warning('Before date/time change');

printDateTime();

sleep(2000);

info('...2 seconds later:');

printDateTime();

systemDateSet(systemDateGet() - 3);

warning('System date changed:');

printDateTime();

sleep(2000);

info('...2 seconds later:');

printDateTime();

systemDateSet(systemDateGet() + 3);

warning('System date is back:');

printDateTime();

sleep(2000);

info('...2 seconds later:');

printDateTime();
}


And this is the result:


P. S.: Kernel version 6.3.4000.1745, Application version 6.3.3000.110



Источник: http://sashanazarov.blogspot.com/201...mdatetime.html
Баг создал?