Localised inline date/time

AI-generated summary

The discussion revolves around the implementation of localized inline date/time functionality in Discourse, originally provided by the Chronos plugin. LeoMcA highlights the need for timezone-aware dates, prompting a conversation about integrating this feature into core. j.jaffeux confirms the plugin, now renamed to Cronos (a spelling correction), has been pushed into core. The rename from Chronos to Cronos sparked debate due to the Greek mythological references—Chronos being time, Cronos a titan known for devouring his children—leading to suggestions for a more intuitive name. sam and codinghorror discuss renaming the plugin to discourse-local-dates to better reflect its purpose. The syntax has been simplified from [discourse-cronos] to [date], improving readability and reducing complexity. sam confirms the final syntax is now in place, though minor changes remain possible. The community expresses concerns about breaking existing posts, with cpradio suggesting a rake task for migration. The plugin will be removed from the repo in the future, and users are advised to update their installations. BlackKnob seeks clarification on upcoming changes, while Stephen and itsbhanusharma reflect on the naming and user experience.

Timezones suck, especially when they make you miss meetings.

It would be incredibly useful to be able to add a date to a post, and have it automagically change into the timezone of the person reading it (if there’s data to do so) or be able to click on it and have it show the time in various (or a user defined) timezone.

I’d love to propose a syntax to use, but I have no idea what makes the most sense. Obviously, it would include ISO 8601 formatted dates in some way.

6 « J'aime »

Saw this tweet recently:

https://twitter.com/discourse/status/990692886197895168?s=19

Is this a core feature now? Does it replace the chronos plugin? https://meta.discourse.org/t/discourse-chronos-globe-with-meridians-timer-clock/69281

2 « J'aime »

This is discourse-chronos, and yes it will probably end up being in core as a core plugin.

2 « J'aime »

It is a requirement for the 2.0 release from my perspective.

5 « J'aime »

I pushed cronos into core, I also took this opportunity to rename chronos to cronos, as it was a spelling mistake :sweat_smile: Enjoy!

5 « J'aime »

So it’s safe to remove the other repo from app.yml? Cronos is still going to work as usual right?

only if you have created dates with [discourse-chronos...] syntax you will need to change it to [discourse-cronos...]

It’s a little bit of pain, but it’s still a very unused plugins, so I did it now.

I’ve created with the insert date option in the gear menu. Not many dates though. I guess if that requires manual modifications then those can be done but does it?

Yes you will have to manually update it, sorry about that. But it was bothering me too much to always read “chronos” :stuck_out_tongue:

2 « J'aime »

I’ll surely take care of it then. Thanks for the heads up.

Ps: It bugged me too cronos vs chronos (felt more like something to arrange chronologically. but what?)

Isn’t there a rake replace task? Would that work for converting it?

Note, definitely remove it from your yaml, in a few weeks we will be making the repo explode, in the mean time I renamed plugin.rb to plugin_old.rb so the old repo will do nothing.

1 « J'aime »

Chronos was the Greek personification of time.
Cronos was a Greek titan, whose symbol was a scythe.

If it was a typo is was a pretty fitting one. Not sure what scythe-wielding Greek Titans have do to with user-friendly times though.

2 « J'aime »

Well … actually…

Cronus was the titan who did some pretty unsavory things to his daddy.

Is an uncommon spelling for cronus… but it can also refer to this horror film

I am kind of with you here, not sure why we renamed it ;p

My understanding is that it is called cronos as a wordplay on cron … the scheduler …

2 « J'aime »

I’ve always thought chronus was appropriate. But I can understand the confusion

cron - Wikipedia

The origin of the name cron is from the Greek word for time, χρόνος (chronos)

1 « J'aime »

Yeah… Considering the rename impacts installations too maybe we could, y’know, have @j.jaffeux revert the name change?

Names are @codinghorror’s department

If he wants this named chronos like it was or leave it cronos like it is now or call it something else like discourse shared dates is up to him.

I do think readability wise we should call the element [date] just like we call poll [poll] and not [discourse-poll] less words makes us all more happy

7 « J'aime »

For sure, and if not I’d just prefer to reference something related to time, rather than a deity who castrated his father and ate his own kids. Right now though there are instances which have [discourse-chronos] referred to which will need to update to something because of this change, it would be great if they didn’t have to update twice.

I had like 10 entries so no big deal but will definitely be interested to know if a rake task exists…

This is what I was thinking of

2 « J'aime »