Skip to content

Commit 3d72455

Browse files
committed
Remove dead code - replace with comment
1 parent 7991863 commit 3d72455

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

lib/services/ngsi/ngsiService.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -688,13 +688,11 @@ function formatAsNGSILD(json){
688688
obj[key] = json[key];
689689
break;
690690
case constants.TIMESTAMP_ATTRIBUTE:
691-
/*
692-
var timestamp = json[constants.TIMESTAMP_ATTRIBUTE].value;
693-
if(timestamp === constants.ATTRIBUTE_DEFAULT || !(moment(timestamp).isValid())){
694-
obj.observedAt = constants.DATETIME_DEFAULT;
695-
} else {
696-
obj.observedAt = moment.tz(timestamp, 'Etc/UTC').toISOString();
697-
}*/
691+
/*
692+
The NGSIv2 timestamp attribute (if it exists) should not be processed here
693+
as it will be removed. The equivalent NGSI-LD observedAt is treated as a simple
694+
string, not a standard NGSI-LD Property.
695+
*/
698696
break;
699697
default:
700698
obj[key] = convertNGSIv2ToLD(json[key]);

0 commit comments

Comments
 (0)