Orion Events: Add schedule generation metadata

This commit is contained in:
Kristian Bendiksen
2026-08-20 11:02:55 +02:00
parent 8c2f23c41b
commit 0b7ce2252c
2 changed files with 35 additions and 0 deletions
@@ -36,6 +36,7 @@
#include "opm/input/eclipse/Deck/DeckRecord.hpp"
#include <QLocale>
#include <QProcessEnvironment>
#include <algorithm>
#include <map>
@@ -55,7 +56,13 @@ QString RicScheduleDataGenerator::generateSchedule( const RimWellEventTimeline&
QString result;
// Header
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
QString userName = environment.value( "USERNAME" );
if ( userName.isEmpty() ) userName = environment.value( "USER", "unknown" );
result += "-- Generated by ResInsight\n";
result += QString( "-- Timestamp: %1\n" ).arg( QDateTime::currentDateTimeUtc().toString( Qt::ISODateWithMs ) );
result += QString( "-- User: %1\n" ).arg( userName );
result += "-- Schedule data based on well events\n";
result += "--\n";