{"html_url": "https://github.com/simonw/datasette/issues/111#issuecomment-924437942", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/111", "id": 924437942, "node_id": "IC_kwDOBm6k_c43Gc22", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-09-21T22:32:59Z", "updated_at": "2021-09-21T22:47:07Z", "author_association": "OWNER", "body": "Side-note: Django 4.0 [will switch](https://docs.djangoproject.com/en/dev/releases/4.0/#zoneinfo-default-timezone-implementation) from using `pytz` to using the standard library `zoneinfo` module introduced in Python 3.9, which has a backport that works as far back as 3.6: https://github.com/pganssle/zoneinfo (https://pypi.org/project/backports.zoneinfo/)\r\n\r\nIf I need to handle timezones I'll use that, but I think I can get away without it?\r\n\r\nDjango does this: https://github.com/django/django/blob/b0ed619303d2fb723330ca9efa3acf23d49f1d19/setup.cfg#L39-L43\r\n\r\n```\r\ninstall_requires =\r\n asgiref >= 3.3.2\r\n backports.zoneinfo; python_version<\"3.9\"\r\n sqlparse >= 0.2.2\r\n tzdata; sys_platform == 'win32'\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274615452, "label": "Add \u201cupdated\u201d to metadata"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/111#issuecomment-924443089", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/111", "id": 924443089, "node_id": "IC_kwDOBm6k_c43GeHR", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-09-21T22:45:14Z", "updated_at": "2021-09-21T22:45:26Z", "author_association": "OWNER", "body": "The audiences I care about here are:\r\n\r\n- Producers of this timestamp - generally that will be users who are using `datasette publish` to share their data\r\n- Human consumers of this timestamp - end users who look at a Datasette site and want to know how recent the data is\r\n- Machine consumers of this timestamp - API integrations that might want to check if a Datasette instance has been updated before downloading new data\r\n\r\nFor producers I think there are going to be two categories. The first is users who run \"publish\" and want the site to reflect when they did so (probably using `--updated=now` when they publish). The second are users who are willing to spend more time thinking about this - for example my various git scraping projects where I want to use a date derived from the git history.\r\n\r\nFor humans... I'd like to be able to calculate a relative time (3 hours ago) in addition to showing the display time, because that helps avoid confusion over timezones.\r\n\r\nFor machine consumers, it might be nice to offer the option of a calculated Unix timestamp-since-1970, since those can be easier to work with in some languages than running a full ISO date parser.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274615452, "label": "Add \u201cupdated\u201d to metadata"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/111#issuecomment-924438481", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/111", "id": 924438481, "node_id": "IC_kwDOBm6k_c43Gc_R", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-09-21T22:34:03Z", "updated_at": "2021-09-21T22:34:21Z", "author_association": "OWNER", "body": "The simplest possible version of this: it's always represented as a UTC ISO datetime, like this: \r\n\r\n \"updated\": \"2020-10-31T12:00:00+00:00\"\r\n\r\nLater versions of Datasette could extend this to handle other timezones or support just the date (though that's a backwards incompatible change so probably better to decide on the date thing right now).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274615452, "label": "Add \u201cupdated\u201d to metadata"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/111#issuecomment-924435971", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/111", "id": 924435971, "node_id": "IC_kwDOBm6k_c43GcYD", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-09-21T22:29:15Z", "updated_at": "2021-09-21T22:29:49Z", "author_association": "OWNER", "body": "So this is a metadata key called `updated` which can be applied at the table, database or instance level. It is represented as a `.isoformat()` timestamp.\r\n\r\nQuestion: should I support just the date - `yyyy-mm-dd` - in addition to the datetime?\r\n\r\nI think so. I can easily imagine situations where the exact time of day that a change was made hasn't been recorded, but the overall date is known.\r\n\r\nBut in that case, should the `updated` key sometimes be `yyyy-mm-dd` and sometimes be the full isoformat datetime? Or should there be an `updated_date` key that's used for just the date?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274615452, "label": "Add \u201cupdated\u201d to metadata"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/111#issuecomment-924432643", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/111", "id": 924432643, "node_id": "IC_kwDOBm6k_c43GbkD", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-09-21T22:23:23Z", "updated_at": "2021-09-21T22:23:23Z", "author_association": "OWNER", "body": "I'm going to use https://github.com/dateutil/dateutil for this - it's been maintained constantly (by an evolving team of contributors) [since 2003](https://github.com/dateutil/dateutil/commit/68ae2757ae15c84bf947d47a82a314b3b975bc9b) and is a very trustworthy dependency.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274615452, "label": "Add \u201cupdated\u201d to metadata"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/111#issuecomment-923106887", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/111", "id": 923106887, "node_id": "IC_kwDOBm6k_c43BX5H", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-09-20T16:58:39Z", "updated_at": "2021-09-20T16:58:39Z", "author_association": "OWNER", "body": "Still a good idea today too! Would be great for https://cdc-vaccination-history.datasette.io/ for example.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274615452, "label": "Add \u201cupdated\u201d to metadata"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/111#issuecomment-738904347", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/111", "id": 738904347, "node_id": "MDEyOklzc3VlQ29tbWVudDczODkwNDM0Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-12-04T17:16:56Z", "updated_at": "2020-12-04T17:16:56Z", "author_association": "OWNER", "body": "This is STILL a good idea.", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274615452, "label": "Add \u201cupdated\u201d to metadata"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/111#issuecomment-697545290", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/111", "id": 697545290, "node_id": "MDEyOklzc3VlQ29tbWVudDY5NzU0NTI5MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-23T15:29:11Z", "updated_at": "2020-09-23T15:29:11Z", "author_association": "OWNER", "body": "This is still a good idea.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274615452, "label": "Add \u201cupdated\u201d to metadata"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/111#issuecomment-502135123", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/111", "id": 502135123, "node_id": "MDEyOklzc3VlQ29tbWVudDUwMjEzNTEyMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-14T14:39:59Z", "updated_at": "2019-06-14T14:39:59Z", "author_association": "OWNER", "body": "This may be the feature that causes me to add dateutilas a dependency (so I can use dateutil.parser.parse)", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274615452, "label": "Add \u201cupdated\u201d to metadata"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/111#issuecomment-502134699", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/111", "id": 502134699, "node_id": "MDEyOklzc3VlQ29tbWVudDUwMjEzNDY5OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-14T14:38:58Z", "updated_at": "2019-06-14T14:38:58Z", "author_association": "OWNER", "body": "I think I'll just call it \"updated\" to avoid the ugly underscore.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274615452, "label": "Add \u201cupdated\u201d to metadata"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/111#issuecomment-502134167", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/111", "id": 502134167, "node_id": "MDEyOklzc3VlQ29tbWVudDUwMjEzNDE2Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-14T14:37:35Z", "updated_at": "2019-06-14T14:37:35Z", "author_association": "OWNER", "body": "We have per-database and per-table metadata now. I think it's time to make this actually happen.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274615452, "label": "Add \u201cupdated\u201d to metadata"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/111#issuecomment-345013127", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/111", "id": 345013127, "node_id": "MDEyOklzc3VlQ29tbWVudDM0NTAxMzEyNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-16T18:23:56Z", "updated_at": "2017-11-16T18:23:56Z", "author_association": "OWNER", "body": "Having this as a global option may not make sense when publishing multiple databases. We can revisit that when we implement per-database and per-table metadata.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 274615452, "label": "Add \u201cupdated\u201d to metadata"}, "performed_via_github_app": null}