azurelunatic: Vivid pink Alaskan wild rose. (Default)
Azure Jane Lunatic (Azz) 🌺 ([personal profile] azurelunatic) wrote2016-02-24 10:29 am

Karzilla's Law

In which [personal profile] sgsabbage, [personal profile] kareila, and [personal profile] alierak discuss time. And, inevitably, time zones.

[personal profile] sgsabbage: [9:10 AM]
hey, @kareila - re latest comment on #commits, when you say the title of the issues fixed, do you mean it needs the # or am I missing somethign? Worried that my commit messages are wrong now :simple_smile:

[personal profile] kareila: [9:13 AM]
Talking about the git commit message, just need a brief description of the problem or fix. Saying only "fixes nnn" in the message doesn't help someone who for whatever reason can't see our GHI data. We've had this problem with commits in the past that only refer to Bugzilla tickets or LJ's bug tracker, neither of which still exist in any public form.

[personal profile] kareila: [9:15]
For embed whitelist, the change is pretty self explanatory but I want to encourage best practices.

[personal profile] sgsabbage: [9:16 AM]
ahh, gotcha, thanks for clarification :heart:

[personal profile] kareila: [9:16 AM]
Thanks for asking :wink:

[personal profile] kareila: [9:21]
Also I am looking at 1682 rn and what the fffffffffff

[Editor's note: 1682 fixes a bug whereby the minutes between 23:30 and 00:00 do not exist for the beta update page time picker.]

[personal profile] sgsabbage: [9:24 AM]
ahahahahahahaaa

[personal profile] sgsabbage: [9:25]
so I found if I set just the interval to 1 on creation, it doesn't work

[personal profile] sgsabbage: [9:25]
if I set the max to 1439 on creation, it freezes when you set the time > 23:30

[personal profile] sgsabbage: [9:25]
if I set both, it works

[personal profile] kareila: [9:25 AM]
Black magic :ghost:

[personal profile] sgsabbage: [9:26 AM]
yeaaah

[personal profile] kareila: [9:26 AM]
Where does 1439 come from?

[personal profile] sgsabbage: [9:27 AM]
there are 1440 minutes in a day (60 * 24) - for some reason the time picker does everything in minutes

[personal profile] sgsabbage: [9:28]
so 1439 = 23:59

[personal profile] kareila: [9:28 AM]
Wow

[personal profile] sgsabbage: [9:29 AM]
what I did find after much debugging, is if you don't set either of them, it figures out the max by multiplying 60 * 24, takes away 1 so that it's 23:59.. and then tries to shove it into the default interval

[personal profile] alierak: [9:30 AM]
bug in the time picker instead then?

[personal profile] sgsabbage: [9:31 AM]
weeelll. I think that the timepicker is designed to either be a pickable or a text input. We're kinda using it as both which is confusing it. I did consider wholesale replacing it, but it seems to work fine with the mods

[personal profile] alierak: [9:32 AM]
mmkay, workaround it is. “1439” might possibly need a comment if kareila had to ask

[personal profile] sgsabbage: [9:32 AM]
good point

[personal profile] kareila: [9:34 AM]
I see 3600 and 86400 in code all the time, but that was a new one

[personal profile] sgsabbage: [9:34 AM]
maaagic numbers

[personal profile] alierak: [9:36 AM]
Somehow I don’t want to have any idea if these magic numbers have DST implications :wink:

[personal profile] kareila: [9:37 AM]
There ought to be a corollary to Godwin's law, any discussion of code will eventually evoke time zones

[personal profile] sgsabbage: [9:38 AM]
there are a certain subset of tests in $work code that failed between the hours of 1 and 2 am two days a year

[personal profile] sgsabbage: [9:38]
eventually I tracked it down to some dodginess in the way PHP deals with times at the changeover period and.. just swapped it out to all use UTC instead :wink:

[personal profile] kareila: [9:41 AM]
Thank you so much, that was a really strange bug. You are my hero of the day. :rainbow::revolving_hearts:

[personal profile] sgsabbage: [9:41 AM]
more than welcome
karzilla: animated nyan octocat (nyan)

GIP

[staff profile] karzilla 2016-02-24 08:22 pm (UTC)(link)
Shenanigans!
vass: Small turtle with green leaf in its mouth (Default)

[personal profile] vass 2016-02-25 02:29 am (UTC)(link)
Time zones are to coding as cats to knitting.
vass: Icon of Saint Ignatius being eaten by lions (eaten by lions)

[personal profile] vass 2016-02-26 06:22 am (UTC)(link)
Inevitable yet unexpected, and creating tangles across a vast area, ranging in effect from mildly hilarious to life-threatening.