Page 1 of 1

Fix Store/Chat sells alert timing

Posted: Sat Apr 23, 2011 9:15 am
by commandermack
Ok, didn't know where to post this, and I figure you can move it if you want.

Chat Notices:
14:13:10 *Notice: JazzyCat (#503) bought 1 wax vampire teeth from your store for 100 Moolah.
14:16:44 *Notice: DiaGeous (#1644) bought 1 wax vampire teeth from your store for 100 Moolah.

Store Logs:
Sat, Apr 23, 2011 14:15 - JazzyCat bought 1 wax vampire teeth for 100 moolah.
Sat, Apr 23, 2011 14:19 - DiaGeous bought 1 wax vampire teeth for 100 moolah.


1. Chat Notices are timed before store logs, which doesn't seem logical as a sale has to be made before it can alert you.
2. The times seem to be off by about Two and a Half Menutes. :P

Re: Fix Store/Chat sells alert timing

Posted: Sat Apr 23, 2011 6:17 pm
by Cowboy
Menutes huh? :P
I don't see this as a major problem, but yeah, it should be fixed.

Re: Fix Store/Chat sells alert timing

Posted: Sun Apr 24, 2011 4:57 pm
by Gobberwart
Chat is driven by javascript, which runs in your browser. If you have timestamps turned on, it will grab your computer's time and add it to the chat messages as they are displayed (ie. the date/time is whatever date/time the message displays).

Store logs, however, are generated by the server, so all dates/times are stored in the database, and converted to your local time if you have your timezone set in your profile.

Since there's likely to be a few seconds between an activity occurring and the message being displayed, I'd expect the chat messages to be a few seconds AFTER the actual store logs, but still in the correct order, but what you're seeing is that the chat messages are several *ahem* "menutes" BEFORE the store logs.

You know what that means, right? Let me repeat something... "it will grab your computer's time and add it to the chat messages as they are displayed"

Yep... your computer clock's about 3 menutes fast, dude. Fix it and all will be well.

Yes, I *could* change it so that the SERVER time gets displayed instead of your computer's local time, but people can have all kinds of weird and wonderful reasons for wanting to have their computer's local time set incorrectly and having that show up in chat, and I'm basically not going to screw with it. Just set your computer clock properly and it'll be fine.

Re: Fix Store/Chat sells alert timing

Posted: Mon Apr 25, 2011 12:12 am
by commandermack
Yeah, I knew why it was happening. Oh well. It will just remain fucked up then.

Re: Fix Store/Chat sells alert timing

Posted: Tue Apr 26, 2011 7:27 pm
by Gobberwart
Anyone else think this should be changed, ie. should I change the chat system so that the timestamps show the times that messages were actually created on the server as opposed to the local time on your computer when the messages are displayed?

The only real problem with doing so that I can think of is that people who haven't set their timezone information will have everything stamped with the server time rather than their local time, or that the server and computer times might be a few minutes different, which in turn means there might be a lot of people asking why the chat timestamps are "wrong".

There's the possibility of adding an option to use local or server times depending on the user's preference, but then I start thinking it's a hell of a lot of mucking about for something that really is a minor issue.

Anyone have any thoughts?

Re: Fix Store/Chat sells alert timing

Posted: Tue Apr 26, 2011 11:01 pm
by sallyfox
yeah........ live and let live

what we want cant be co ordinated, or so it would seem

Re: Fix Store/Chat sells alert timing

Posted: Tue Apr 26, 2011 11:47 pm
by commandermack
it really isn't that big a deal. I was more of thinking that, if people wanted Local time for Chat, they would probably want Local time for Store. I can't see a reason why they would want them both to be different, but that is limited thinking, so I'm really fine with the way it is, because coding to fix it would be a hassle and it isn't that big a deal or difference. When I first brought this up, I wasn't thinking about that because I wasn't thinking about them being different calculating sources(Javascript/Server), so I thought it might be an easier fix, but clearly it wouldn't be.

Re: Fix Store/Chat sells alert timing

Posted: Thu Apr 28, 2011 12:26 pm
by Gobberwart
The big difference is that chat is a live action thing, so as stuff happens, it gets stamped right in your face, by your computer. Everything else is stored on the server and retrieved later, so it can't be stamped by your computer (because it wasn't paying attention at the time). Changing chat to put database timestamps instead of local computer times really isn't all that much work, but my feeling is that it would confuse people who would look at their clock and think chat was broken, more so than those who would compare against store logs and notice the difference. That would just lead to lots of "bug reports" and/or people asking in chat why it didn't work properly and mods having to answer the same question over and over.

Since you're the first person to ever ask about it, and you're satisfied with the answer... I think I'll just leave it alone rather than open a can of worms lol.