#dev 2020-09-22

2020-09-22 UTC
#
aaronpk
Mastodon is so close to being able to support IndieAuth https://media.aaronpk.com/2020/09/file-20200921171329-5620.png
#
aaronpk
they already ask you to type your URL when you sign in
#
aaronpk
(server name, not full profile URL)
jjuran, jonnybarnes, VioletPixel, geoffo, flex14 and [chrisaldrich] joined the channel
#
@jacobtyq
Webmentions are like pingbacks right?
(twitter.com/_/status/1308233253166305281)
jonnybarnes, jeremycherfas, KartikPrabhu, VioletPixel, [LewisCowles], oodani, cweiske, [James_Gallaghe], swentel, moppy, smacko, sebbu, flex14, jeremych_, [tantek], [tw2113], geoffo, dckc, [schmarty], lahacker, nickodd, [snarfed], [kimberlyhirsh] and [chrisaldrich] joined the channel
#
@brianjesse
the chronological newsfeed stopped working for me at Facebook again - what is with that ? #rss #indieweb #mastodon #socialmedia #infrastructure #bearhugcamp #track #webmention #pubsubhubbub #omb #ostatus #dweb
(twitter.com/_/status/1308469984973053952)
jonnybarnes, [Ana_Rodrigues], KartikPrabhu, [snarfed], [James_Gallaghe], [schmarty] and paulrobertlloyd joined the channel; nickodd left the channel
#
paulrobertlloyd
I added timezone support to my Micropub server project, Indiekit, and immediately regretted it 😂. I think I’ve got it close to working properly, but would welcome a sense check.
#
aaronpk
what exactly does "added timezone support" mean?
#
paulrobertlloyd
Well, good question, I may be doing something I might not need to!
#
paulrobertlloyd
So firstly, if a micropub request includes a published property, I’ll take that as being correct, and pass it on to the template renderer.
#
paulrobertlloyd
However, if no published property is given, I use UTC time, and pass that value on. So now that would be 2020-09-22T19:23:41.870Z
#
paulrobertlloyd
If no published property is given AND you’ve configured the server with a timezone, my thought is that I send the UTC date plus the offset. So, if you have set your timezone to 'America/New_York', I’d pass on 2020-09-22T19:23:41.891-04:00
#
paulrobertlloyd
Is that in any way correct!!?
#
aaronpk
that seems reasonable
#
aaronpk
one other situation you might want to account for is overriding the timezone that a client sends
#
aaronpk
probably not by default, but it can be useful
#
aaronpk
if a client isn't aware of the timezone a user is in, and the user always wants to publish in their timezone in the config for example
#
paulrobertlloyd
So, if the given published value is 2020-09-22T19:23:41.891-04:00 (New York), but you’ve set your server up to use Europe/London, for example?
#
aaronpk
yeah, then the server would convert that to London time
#
paulrobertlloyd
Interesting!
#
aaronpk
again it's personal preference as to whether you want that to happen
#
aaronpk
but i know some people always want their posts published in their home timezone, whereas others want them published in whatever timezone they were in when the post was made
#
aaronpk
there's another situation you need to make a decision on how to handle, with no obviously correct answer too...
#
paulrobertlloyd
Yeah. I tend to find that I like my posts to use UTC + offset, only because that makes sense in terms of reading winter/summer time. But UTC makes less sense perhaps if you don’t live in GMT timezone.
#
aaronpk
if the published time in the micropub request does not contain a timezone, e.g. 2020-09-01T19:20:00
#
aaronpk
you need to decide whether to interpret that as UTC or interpret it as local time
#
aaronpk
or, harder, store it without a timezone at all
#
paulrobertlloyd
Oh boy, as I was saying, I immediately regret adding this feature 😂
#
paulrobertlloyd
I think, at least for now, it’s easier to understand rule that if you give a published date, the server accepts whatever it’s given. For now, at least.
#
aaronpk
you still have to make that decision about how a published date with no timezone is handled
#
aaronpk
if you're not doing anything, chances are you're interpreting and storing it as UTC
#
paulrobertlloyd
So 2020-09-01T19:20:00 for example?
#
paulrobertlloyd
And the decision might be different if you have set a timezone or not. Perhaps it should be saved as UTC, unless you have set a timezone, in which case add the timezone offset to it
#
aaronpk
probably
#
aaronpk
e.g. 2020-09-01T19:20:00 -> 2020-09-01T19:20:00-04:00, which is interpreting the input as local time rather than interpreting it as UTC and converting to local time
#
aaronpk
this is why i always try to get the timezone offset in the micropub client in the first place so that i don't send floating times to servers. e.g. if i'm traveling and open a browser client where the client uses the device's local time, that would end up being stored as the wrong date unless the client sends the timezone offset
[LewisCowles] joined the channel
#
paulrobertlloyd
How can I get a client’s timezone offset?
#
aaronpk
the client has to send it
#
aaronpk
in JS you can create a date object and grab it from there
#
aaronpk
different in an iOS app obviously
#
aaronpk
so ideally yes the client is going to send a full timestamp like "2020-09-01T19:20:00-04:00", but that requires extra work of the client developer, so you need to be ready to handle the case when the client doesn't send the offset
#
paulrobertlloyd
Hmmm, going to noodle on this… seems like I need to account for the following variables: published date given/missing, published date has/does not have a timezone, server has/has not configured a timezone.
#
aaronpk
i think that is the extent of the options you've laid out
#
paulrobertlloyd
Is there any prior art for this at all?
#
aaronpk
my website :D
#
aaronpk
i go one step further and my "server's configured timezone" actually changes as i travel around
#
paulrobertlloyd
Can you point me to any relevant code?
#
aaronpk
hm, i think all my server stuff isn't public. but i can share quill's client code
#
paulrobertlloyd
That’d be amazing!
#
aaronpk
oh hah, quill actually stores the user's default timezone if they ever use the geolocation api in the browser
#
aaronpk
so if the user includes location in their post, quill looks up the timezone for that location, then will continue to use it in future posts
#
aaronpk
here's where it gets the timezone from the browser https://github.com/aaronpk/Quill/blob/master/public/js/script.js#L23
#
@kevquirk
↩️ Hey. I don’t know what’s happening with the site at the moment. A couple of people have reported issues with webmention, but not standard comments. I did see your comment though. Need to get to the bottom of it, thanks for letting me know.
(twitter.com/_/status/1308493378674462721)
[jgmac1106] and jonnybarnes joined the channel
#
[schmarty]
(bringing this discussion from main room) lahacker: a .onion may not be forever! hidden services v2 will be deprecated over the next year or so!
#
[schmarty]
that reminds me i need to update mine to v3 sometime http://schmartyp7qtjzn7.onion/
#
aaronpk
heh how long did it take to find that hash?
#
aaronpk
good reminder that any time you bake crypto into a protocol it will eventually need to be replaced https://lists.torproject.org/pipermail/tor-dev/2020-June/014365.html
#
[schmarty]
a few hours i think? if i recall correctly the tool was called scallion and it made good use of my video card 😂
#
[schmarty]
i hope those tools have been updated to generate v3 onions 🤔
#
sknebel
what is Tor?
#
Loqi
Tor (The Onion Router) is "a network of virtual tunnels that allows people and groups to improve their privacy and security on the Internet https://indieweb.org/Tor
#
sknebel
hah, that page even says something about brute-forcing addresses
#
lahacker
aaronpk, schmarty both good points
#
lahacker
i really like the way matrix has animated a walkthrough under "How does it work?" at https://matrix.org/
#
lahacker
if those big nodes are "homeservers" and the smaller nodes are "clients" what would the indieweb equivalent be for those clients? simply readers with micropub support?
#
lahacker
is there some kind of matrix integration here in chat or elsewhere in the indieweb? the wiki page is scant on details
#
jacky
I forget how it works
#
aaronpk
what is discuss?
#
Loqi
Join the #indieweb discussion via the web, Slack, IRC, or Matrix clients now with additional channels for dev, wordpress, and meta specific chat! https://indieweb.org/discuss
#
jacky
pats Loqi
[chrisaldrich], leg, [manton], shakeel, ludovicchabant, themaxdavitt, cjav_dev, jbove, [fluffy], dckc, [Sue_Hanen], jonnybarnes and [keithjgrant] joined the channel