TBD54566975 / dwn-sdk-js

Decentralized Web Node (DWN) Reference implementation

Home Page:https://identity.foundation/decentralized-web-node/spec/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create a utility method for creating a DWN compatible timestamp

thehenrytsai opened this issue · comments

Background:

When creating a message, there is ability to supply your own timestamp in IOS 8601 format with microsecond precision, but we don't provide a utility method for this.

Task Details:

Create a utility method for creating a timestamp accepted by DWN.

A potential method signature:

  /**
   * Creates a UTC ISO-8601 timestamp in microsecond precision accepted by DWN.
   */
  public static createTimestamp(year: number, month: number, day: number, hour: number:, minute: number, second: number, subsecond: number): string {
    ...
  }

For implementation reference you can check out this test utility.

Picking Up This Issue:

  • If you'd like to work on this, please comment "picking this up" below, and I'll assign the issue to you

Questions:

Resources:

  • Creating a Pull Request: If you're new to GitHub and unsure how to create a pull request, follow this step-by-step guide.

Remember, communication is key! If you have any questions or face any challenges, we're here to help so please don't hesitate to reach out.

Good Luck! 🍁

commented

picking this up

commented

@Dhoni77 just seeing if you are still wanting to work on this. If not, I'm happy to pick it up!
@EbonyLouis

commented

@Dhoni77 just seeing if you are still wanting to work on this. If not, I'm happy to pick it up! @EbonyLouis

Hi @flothjl you can pick it👍

This is now done.