File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff 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 ] ) ;
You can’t perform that action at this time.
0 commit comments