Skip to content

Commit 70d614d

Browse files
committed
Manually merge PR156
git-svn-id: svn+ssh://svn.code.sf.net/p/migrid/code/trunk@6174 b75ad72c-e7d7-11dd-a971-7dbc132099af
1 parent 5ca6936 commit 70d614d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

mig/shared/refunctions.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# --- BEGIN_HEADER ---
55
#
66
# refunctions - runtime environment functions
7-
# Copyright (C) 2003-2021 The MiG Project lead by Brian Vinter
7+
# Copyright (C) 2003-2024 The MiG Project lead by Brian Vinter
88
#
99
# This file is part of MiG.
1010
#
@@ -383,6 +383,11 @@ def build_reitem_object(configuration, re_dict):
383383
'example': environment_item['example'],
384384
'description': environment_item['description'],
385385
})
386+
created_timestamp = re_dict['CREATED_TIMESTAMP']
387+
# Timestamp should always be set but default to epoch e.g. if None
388+
if not created_timestamp:
389+
created_timestamp = datetime.datetime.utcfromtimestamp(0)
390+
created_timetuple = created_timestamp.timetuple()
386391
created_timetuple = re_dict['CREATED_TIMESTAMP'].timetuple()
387392
created_asctime = time.asctime(created_timetuple)
388393
created_epoch = time.mktime(created_timetuple)

0 commit comments

Comments
 (0)