Fix Store/Chat sells alert timing

Got a suggestion as to how we can improve the game? Post it here!

Moderator: Public Forum Moderators

User avatar

Topic author
commandermack
Chat Moderator
Posts: 1024
Joined: Thu Mar 19, 2009 5:40 pm

Fix Store/Chat sells alert timing

Unread post by commandermack » Sat Apr 23, 2011 9:15 am

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


Cowboy
Forum Addict
Posts: 885
Joined: Thu Oct 01, 2009 2:52 pm

Re: Fix Store/Chat sells alert timing

Unread post by Cowboy » Sat Apr 23, 2011 6:17 pm

Menutes huh? :P
I don't see this as a major problem, but yeah, it should be fixed.
Image

User avatar

Gobberwart
Developer
Posts: 3396
Joined: Wed Jun 20, 2007 12:41 am
Location: Melbourne, Australia
Contact:

Re: Fix Store/Chat sells alert timing

Unread post by Gobberwart » Sun Apr 24, 2011 4:57 pm

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.
Image

User avatar

Topic author
commandermack
Chat Moderator
Posts: 1024
Joined: Thu Mar 19, 2009 5:40 pm

Re: Fix Store/Chat sells alert timing

Unread post by commandermack » Mon Apr 25, 2011 12:12 am

Yeah, I knew why it was happening. Oh well. It will just remain fucked up then.

User avatar

Gobberwart
Developer
Posts: 3396
Joined: Wed Jun 20, 2007 12:41 am
Location: Melbourne, Australia
Contact:

Re: Fix Store/Chat sells alert timing

Unread post by Gobberwart » Tue Apr 26, 2011 7:27 pm

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

User avatar

sallyfox
Senior Chat Moderator
Posts: 908
Joined: Mon Nov 10, 2008 2:40 am

Re: Fix Store/Chat sells alert timing

Unread post by sallyfox » Tue Apr 26, 2011 11:01 pm

yeah........ live and let live

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

User avatar

Topic author
commandermack
Chat Moderator
Posts: 1024
Joined: Thu Mar 19, 2009 5:40 pm

Re: Fix Store/Chat sells alert timing

Unread post by commandermack » Tue Apr 26, 2011 11:47 pm

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.

User avatar

Gobberwart
Developer
Posts: 3396
Joined: Wed Jun 20, 2007 12:41 am
Location: Melbourne, Australia
Contact:

Re: Fix Store/Chat sells alert timing

Unread post by Gobberwart » Thu Apr 28, 2011 12:26 pm

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.
Image

Post Reply