• carrylex@lemmy.worldOP
    link
    fedilink
    arrow-up
    2
    ·
    4 months ago

    Just for further clarification, the API works like this:

    • time is the local 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.plusHours(timezoneoffset).atZone(servertimezone).toUTC()