1 //#65 rln 12.02.99 S4151 (explicitly force YYMMDD.HHMMSS before Y2000 and YYYYMMDD.HHMMSS after Y2000)
2 #include <IGESSelect_UpdateCreationDate.ixx>
3 #include <OSD_Process.hxx>
4 #include <Quantity_Date.hxx>
5 #include <IGESData_GlobalSection.hxx>
6 #include <TCollection_HAsciiString.hxx>
7 #include <Interface_Check.hxx>
11 IGESSelect_UpdateCreationDate::IGESSelect_UpdateCreationDate ()
12 : IGESSelect_ModelModifier (Standard_False) { }
14 void IGESSelect_UpdateCreationDate::Performing
15 (IFSelect_ContextModif& ctx,
16 const Handle(IGESData_IGESModel)& target,
17 Interface_CopyTool& ) const
19 Standard_Integer jour,mois,annee,heure,minute,seconde,millisec,microsec;
21 Quantity_Date ladate = system.SystemDate();
22 ladate.Values (mois,jour,annee,heure,minute,seconde,millisec,microsec);
24 IGESData_GlobalSection GS = target->GlobalSection();
26 //#65 rln 12.02.99 S4151 (explicitly force YYMMDD.HHMMSS before Y2000)
27 GS.SetDate (IGESData_GlobalSection::NewDateString
28 (annee,mois,jour,heure,minute,seconde,0));
30 //#65 rln 12.02.99 S4151 (explicitly force YYYYMMDD.HHMMSS after Y2000)
31 GS.SetDate (IGESData_GlobalSection::NewDateString
32 (annee,mois,jour,heure,minute,seconde, -1));
33 target->SetGlobalSection(GS);
34 Handle(Interface_Check) check = new Interface_Check;
35 target->VerifyCheck(check);
40 TCollection_AsciiString IGESSelect_UpdateCreationDate::Label () const
41 { return TCollection_AsciiString ("Update Creation Date in IGES Global Section"); }