Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 16, 2025

Bumps github.com/shamaton/msgpack/v2 from 2.3.1 to 2.4.0.

Release notes

Sourced from github.com/shamaton/msgpack/v2's releases.

v2.4.0

Highlights

  • New global switches to control the timezone used when decoding MessagePack Timestamp into Go’s time.Time.
  • No breaking changes in v2.4.0. The default behavior remains Local.
  • Heads-up for v3: default decoded time.Time will change to UTC (instant unchanged).

Added

  • msgpack.SetDecodedTimeAsUTC() — forces decoded time.Time to use UTC.
  • msgpack.SetDecodedTimeAsLocal() — forces decoded time.Time to use Local (mirrors current default in v2.x).

These functions allow you to preview and standardize your runtime behavior before upgrading to v3.

Why this matters

MessagePack’s Timestamp represents an instant (epoch seconds + nanoseconds) and does not carry timezone info. Historically, decoding to Local could lead to environment-dependent differences across hosts. Many distributed systems and APIs prefer UTC for predictability.

Usage

// Opt in to UTC decoding on v2.x (recommended for distributed systems/APIs)
msgpack.SetDecodedTimeAsUTC()
// Restore/keep Local decoding explicitly
msgpack.SetDecodedTimeAsLocal()

Note: v2.4.0 still defaults to Local unless you call SetDecodedTimeAsUTC().

What’s next (v3 heads-up)

In v3.0.0, the default decoded time.Time location will change from Local to UTC. The encoded/decoded instant is unchanged; only time.Time.Location() differs. If you rely on local display, you’ll be able to call msgpack.SetDecodedTimeAsLocal() to keep the old behavior.

Migration tips

  • If your UI expects local time, call msgpack.SetDecodedTimeAsLocal() at startup.
  • For logs/APIs/DBs, consider standardizing on UTC now via msgpack.SetDecodedTimeAsUTC() to smooth the v3 upgrade.
  • Tests that assert string forms of time.Time may need to normalize to UTC or set the desired location explicitly.

Links

Full Changelog: shamaton/msgpack@v2.3.1...v2.4.0

Commits
  • 2dcdf8e Merge pull request #52 from shamaton/feature/time-local-utc-decode
  • 44fb0bc add Announcement to README
  • 84ccecf add time test cases
  • a59081c add configurable timezone for decoded time.Time values
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/shamaton/msgpack/v2](https://github.com/shamaton/msgpack) from 2.3.1 to 2.4.0.
- [Release notes](https://github.com/shamaton/msgpack/releases)
- [Commits](shamaton/msgpack@v2.3.1...v2.4.0)

---
updated-dependencies:
- dependency-name: github.com/shamaton/msgpack/v2
  dependency-version: 2.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot requested a review from a team as a code owner October 16, 2025 12:02
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 16, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@gaby gaby merged commit c6e6d72 into main Oct 19, 2025
12 checks passed
@gaby gaby deleted the dependabot/go_modules/github.com/shamaton/msgpack/v2-2.4.0 branch October 19, 2025 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants