Closed domguinard closed 3 years ago
set defaults:
eventTime = current date/time,
eventTimeZoneOffset = current time-zone offset,
it would also be good to think if there are other fields we can auto-populate
With the next version of epcis2.js
, you'll be able to do this:
const o = new ObjectEvent();
const offset = o.getEventTimeZoneOffset(); // returns the actual timeZoneOffset, e.g "+02:00"
const eventTime = o.getEventTime(); // returns the time when the event was created
Added to release 1.1.0.
(requested by Scott @Zebra) - it would be good to auto-populate
EventTime
andEventTimeZoneOffset
with the client time and timezone if these fields are not present.