Localised inline date/time


(Leo McArdle) #1

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.


(Dave McClure) #2

Saw this tweet recently:

Is this a core feature now? Does it replace the chronos plugin? Discourse-chronos 🌐 ⏲


(Joffrey Jaffeux) #3

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


(Jeff Atwood) #4

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


(Joffrey Jaffeux) #6

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


(Bhanu Sharma) #7

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


(Joffrey Jaffeux) #8

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.


(Bhanu Sharma) #9

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?


(Joffrey Jaffeux) #10

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:


(Bhanu Sharma) #11

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?)


(cpradio) #12

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


(Sam Saffron) #13

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.


(Stephen) #14

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.


(Sam Saffron) #15

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 …


(Mittineague) #16

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)


(Stephen) #17

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


(Sam Saffron) #18

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


(Stephen) #19

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.


(Bhanu Sharma) #20

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


(cpradio) #21

This is what I was thinking of