OHIF-118 Fix the issue with retrieving AcquisitionDateTime or any DT DICOM attribute via DIMSE

This commit is contained in:
Evren Ozkan committed 2016-10-24 22:41:10 -04:00
1 parent 90069329e6
commit 9d279e8626
3 files changed
+11 -9

No files matched your search

+10 -7
View File
@@ -283,13 +283,16 @@ DateTime = function() {
util.inherits(DateTime, ValueRepresentation);
DateTime.prototype.getFields = function(value) {
var year = date.getUTCFullYear(),
month = paddingLeft('00', date.getUTCMonth()),
day = paddingLeft('00', date.getUTCDate()),
hour = paddingLeft('00', date.getUTCHours()),
minute = paddingLeft('00', date.getUTCMinutes()),
second = paddingLeft('00', date.getUTCSeconds()),
millisecond = paddingLeft('000', date.getUTCMilliseconds());
if (!value)
return DateTime.super_.prototype.getFields.call(this, [new StringField("")]);
var year = value.getUTCFullYear(),
month = paddingLeft('00', value.getUTCMonth()),
day = paddingLeft('00', value.getUTCDate()),
hour = paddingLeft('00', value.getUTCHours()),
minute = paddingLeft('00', value.getUTCMinutes()),
second = paddingLeft('00', value.getUTCSeconds()),
millisecond = paddingLeft('000', value.getUTCMilliseconds());
return DateTime.super_.prototype.getFields.call(this, [new StringField(year + month + day + hour + minute + second + '.' + millisecond + '+0000')]);
};