diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2010-08-26 13:17:12 +0200 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2010-08-26 13:17:12 +0200 |
commit | d4db8f570730be85039435919ec78b119d7da3f5 (patch) | |
tree | be0ed8a9c41e7c5dbf723709c3998379a388e060 /l10ntools/scripts | |
parent | 3276498b1d3b6337e33621b351755b02abea6e30 (diff) |
masterfix: #i10000# modify extract date and dummy fields for string database
Diffstat (limited to 'l10ntools/scripts')
-rw-r--r-- | l10ntools/scripts/tool/sdf.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/l10ntools/scripts/tool/sdf.py b/l10ntools/scripts/tool/sdf.py index dd413b14f75f..96afbed1452c 100644 --- a/l10ntools/scripts/tool/sdf.py +++ b/l10ntools/scripts/tool/sdf.py @@ -26,6 +26,7 @@ #************************************************************************* from pseudo import PseudoSet,PseudoOrderedDict +from time import gmtime, strftime class SdfData: _filename = ""; @@ -114,7 +115,7 @@ class SdfEntity: const._DATE_POS = 14 def __init__(self, project="", source_file="", dummy1="0", resource_type="", gid="", lid="", helpid="", platform="", dummy2="0", langid="", - text="", helptext="", quickhelptext="", title="", date="2002-02-02 02:02:02"): + text="", helptext="", quickhelptext="", title="", date=""): self.project = project; self.source_file = source_file; self.dummy1 = dummy1; @@ -129,7 +130,11 @@ class SdfEntity: self.helptext = helptext; self.quickhelptext = quickhelptext; self.title = title; - self.date = date; + if date != "": + self.date = date; + else: + self.date = strftime("%Y-%m-%d %H:%M:%S",gmtime()) + def set_properties(self, line): splitted = line.split("\t") |