X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FNotification%2FNOTIFICATION.cxx;h=73a0fc6a1d5288cfa08e66b34c157a3e13614ae7;hb=9c6ed3579d4bd6b75aec9405620638b9629a2a45;hp=09fab3362d1afef7aef6d67f92a75bdd5a568707;hpb=f876c49e5d46d086f1d741abada5ae86494bb5bb;p=modules%2Fkernel.git diff --git a/src/Notification/NOTIFICATION.cxx b/src/Notification/NOTIFICATION.cxx index 09fab3362..73a0fc6a1 100644 --- a/src/Notification/NOTIFICATION.cxx +++ b/src/Notification/NOTIFICATION.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -27,12 +27,10 @@ // #include "NOTIFICATION.hxx" -#include "Utils_ORB_INIT.hxx" -#include "Utils_SINGLETON.hxx" +#include "OpUtil.hxx" CosNA_EventChannel_ptr NOTIFICATION_channel() { - ORB_INIT& init = *SINGLETON_::Instance(); ASSERT(SINGLETON_::IsAlreadyExisting()); - CORBA::ORB_ptr orb = init(0, 0); + CORBA::ORB_ptr orb = KERNEL::GetRefToORB(); CosNA_EventChannel_ptr channel = CosNA_EventChannel::_nil(); CosNaming::NamingContext_var name_context; @@ -88,11 +86,16 @@ static char Mois[12][4] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug static char NOTIFICATION_DATE[50]; char* NOTIFICATION_date() { +#ifndef WIN32 time_t aTime; time(&aTime); struct tm* temps = localtime(&aTime); sprintf(NOTIFICATION_DATE, "%4d %3d %3s %2d %3s %02d:%02d:%02d", 1900+temps->tm_year, temps->tm_mon+1, Mois[temps->tm_mon], temps->tm_mday, JourSemaine[temps->tm_wday], temps->tm_hour, temps->tm_min, temps->tm_sec); - +#else + SYSTEMTIME st; + GetLocalTime(&st); + sprintf(NOTIFICATION_DATE, "%4d %3d %3s %2d %3s %02d:%02d:%02d", st.wYear, st.wMonth, Mois[st.wMonth-1], st.wDay, JourSemaine[st.wDay], st.wHour, st.wMinute, st.wSecond); +#endif return(NOTIFICATION_DATE); }