@devilish666 to Programmer [email protected] • 9 months agoDaylight saving creator left the chat....imagemessage-square39arrow-up1239arrow-down113
arrow-up1226arrow-down1imageDaylight saving creator left the chat....@devilish666 to Programmer [email protected] • 9 months agomessage-square39
minus-square@[email protected]linkfedilink3•9 months agoStore in UTC with the tz offset and if you’re using a modern tz library, that should handle it for you.
minus-square@Phrodo_00link2•9 months agotz offset is really not enough. You’d need to save the time zone id and/or offset, to have you library calculate deviations such as daylight savings. Even that, that would break if the user moves and now what they setup is using their previous timezone. Basically, I’m saying that storing the offset works most of the time, but not all of the time.
minus-square@[email protected]linkfedilink2•9 months agoYeah that’s true, tzid is probably better than just a straight offset, that’s probably what I was thinking but it was late when I posted lol. And the user moving is really more an issue of making updating that accessible imo
Store in UTC with the tz offset and if you’re using a modern tz library, that should handle it for you.
tz offset is really not enough. You’d need to save the time zone id and/or offset, to have you library calculate deviations such as daylight savings.
Even that, that would break if the user moves and now what they setup is using their previous timezone.
Basically, I’m saying that storing the offset works most of the time, but not all of the time.
Yeah that’s true, tzid is probably better than just a straight offset, that’s probably what I was thinking but it was late when I posted lol. And the user moving is really more an issue of making updating that accessible imo