Closed copleykj closed 1 year ago
hey Kelly, yep the js Date object will be in your local timezone, without the offset applied.
If you want a js date with the offset applied, i'd do let d = new Date(s.epoch)
i know this is a mess, receptive to ideas to improve either the docs or API cheers
let d = new Date(s.epoch)
This is exactly what .toNativeDate()
does and the date returned is the same as the original starting date.
oh right - maybe this could work then
let d = new Date(s.iso())
cheers
calling the
toNativeDate()
method returns a date equal to the date when initialized.The correct functionality is housed within the
spacetimeInstance.d
getter but it is marked as deprecated and specifies to use thetoNativeDate()