picoblog icon indicating copy to clipboard operation
picoblog copied to clipboard

Use date instead of id and show date in local timezone

Open sorenpeter opened this issue 5 years ago • 3 comments

I don't know to integrate this in a nice way, but i want you to have the code and maybe you can come up with something clever.

sorenpeter avatar Feb 02 '21 18:02 sorenpeter

@sorenpeter This is a nice idea and can be added as an option or config flag.

One thing to think about - the point of IDs is to be able to address and "reply" to them with ease. While addressing a specific entry should be relatively fine, will replying be the same?

hxii avatar Feb 02 '21 18:02 hxii

Using id over date and reverse sorting does not make any sense when using twtxt, since it just an increasing number. The issue is that you cannot use it for permalinks, because the latest post will always have id="0" as show in this html:

<li class="e"><a href='?id=0' title='2021-02-02T18:15:00Z' class='date'>2021-02-02 19:15</a> test post 3</li>
<li class="e"><a href='?id=1' title='2021-02-02T18:10:26Z' class='date'>2021-02-02 19:10</a> test post 2</li>
<li class="e"><a href='?id=2' title='2021-01-31T19:42:42Z' class='date'>2021-01-31 20:42</a> test post 1</li>

If the client (PicoblogUI?) generates hashes like they do on twt.social then it might work, but is a feature I would not have to rely on, since it breaks if you change the content in your posts

sorenpeter avatar Feb 05 '21 16:02 sorenpeter

@sorenpeter the ID depends on the creator of the entry. It already exists in the API and will be in picoblogUI. More info: http://wiki.0xff.nu/picoblog/spec#entry-id API: http://wiki.0xff.nu/picoblog/api

hxii avatar Feb 05 '21 17:02 hxii