diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 90d4ab6..b190c0f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -11,12 +11,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go: [ '1.18', '1.21' ] + go: [ '1.21' ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go }} diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 1169dd4..4fdc07a 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -14,18 +14,18 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go: [ '1.18' ] + go: [ '1.21' ] steps: - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go }} - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v4 with: # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version - version: v1.45.2 + version: v1.57.2 # Optional: working directory, useful for monorepos # working-directory: somedir diff --git a/go.mod b/go.mod index a0f4358..4a9f699 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/free5gc/ngap -go 1.17 +go 1.21 require ( github.com/free5gc/aper v1.0.5 diff --git a/ngapConvert/TimeStamp.go b/ngapConvert/TimeStamp.go index 6272dd8..5063c88 100644 --- a/ngapConvert/TimeStamp.go +++ b/ngapConvert/TimeStamp.go @@ -10,31 +10,30 @@ import ( /* RFC 5905 Section 6 https://tools.ietf.org/html/rfc5905#section-6 - 0 1 2 3 - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | Seconds | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | Fraction | - +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - - NTP Timestamp Format - - The 64-bit timestamp format is used in packet headers and other - places with limited word size. It includes a 32-bit unsigned seconds - field spanning 136 years and a 32-bit fraction field resolving 232 - picoseconds. The 32-bit short format is used in delay and dispersion - header fields where the full resolution and range of the other - formats are not justified. It includes a 16-bit unsigned seconds - field and a 16-bit fraction field. - - In the date and timestamp formats, the prime epoch, or base date of - era 0, is 0 h 1 January 1900 UTC, when all bits are zero. It should - be noted that strictly speaking, UTC did not exist prior to 1 January - 1972, but it is convenient to assume it has existed for all eternity, - even if all knowledge of historic leap seconds has been lost. Dates - are relative to the prime epoch; values greater than zero represent - + 0 1 2 3 + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Seconds | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Fraction | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + + NTP Timestamp Format + + The 64-bit timestamp format is used in packet headers and other + places with limited word size. It includes a 32-bit unsigned seconds + field spanning 136 years and a 32-bit fraction field resolving 232 + picoseconds. The 32-bit short format is used in delay and dispersion + header fields where the full resolution and range of the other + formats are not justified. It includes a 16-bit unsigned seconds + field and a 16-bit fraction field. + + In the date and timestamp formats, the prime epoch, or base date of + era 0, is 0 h 1 January 1900 UTC, when all bits are zero. It should + be noted that strictly speaking, UTC did not exist prior to 1 January + 1972, but it is convenient to assume it has existed for all eternity, + even if all knowledge of historic leap seconds has been lost. Dates + are relative to the prime epoch; values greater than zero represent */ func TimeStampToInt32(timeStampNgap aper.OctetString) (timeStamp int32) { if len(timeStampNgap) != 4 {