Template

Further reading: RFC 3339 / ISO 8601

you are viewing a single comment's thread
view the rest of the comments
[–] [S] 3 points 2 years ago* (last edited 2 years ago)

Just for further clarification, the API works like this:

  • time is the local (client) time (in this case UTC-7)
  • servertimezone is the time zone where the server is located
  • timezoneoffset is the offset of the local time relative to the servertimezone (offset from the servers PoV)

To get the UTC date you have to do something like this:

time.minusHours(timezoneoffset).atZone(servertimezone).toUTC()
  • source
  • parent