Timestamp of comment uses user's system time settings.
As you can see in the picture below, the timestamp of a comment uses the user's system time setting. I think it makes more sense to display the server time.

Is this right after commenting (javascript) or after a page refresh?
I see, after a page refresh it is correct :smile:
I want to fix this some day but its not worth the effort at the moment. Comments are currently rendered by Freemarker and the date is formatted for the browsers preferred Locale. This is however difficult to integrate with the REST api used for posting the comments, therefore we use the JS current time as a quick fix.VLater on we will probably leave the rendering of the comments to AngularJS or Web components, which will also take over the date format.
I guess I will leave this issue open?
Yes that is OK, the inconsistency between the javascript injected comments and freemarker comments are a known issue though ;) And I might fix this when implementing Markdown (#149) but I first want to find out a better way to manage web dependencies.
Btw, I believe you can XSS some fancy colours into your comments by abusing this very same problem. You won't be able to harm others though ;)
Not sure, but in class ProjectResource, I see a line which returns a CommentResponse with the date set to server time? This CommentResponse is returned to the AJAX call here. Afterwards you are creating the comment container here. This should display the server time right (res.date)? Or am I missing something? Where is the part where it sets the current time?
The ProjectResource is responsible for the comment backend endpoint: https://github.com/devhub-tud/devhub/blob/master/src/main/java/nl/tudelft/ewi/devhub/server/web/resources/ProjectResource.java#L223 . It uses the toString of the date apparently.
I am also confused by this haha. Maybe there is a difference in implementation between commit/pr comments and inline comments