Ecotrust / solomon

1 stars 5 forks source link

Time is off in the dashboard #191

Closed twelch closed 11 years ago

twelch commented 11 years ago

So the respondant times I see in the admin list view is correct but the dashboard respondant time doesn't match this and is incorrect. It seems to be ahead 11 hours? They should match!

eknuth commented 11 years ago

Ok. Timezone stuff is always a challenge.

First of all, I was using the wrong formatting string and was outputting month instead of minute.

Second there seems to be some weird interaction between the time zones coming out of the date base and the date formatting. The date looks is stored as Solomons UTC+11 in the db and seems to be correct. It was getting rewritten into the local time of the browser, which is opaque, but not so bad.

But there seemed to be a problem with the math. I created a new date filter that is a light wrapper around the date.js formatter. It's doing the date math correctly, but will show the time converted into the browsers local time...

We might need to think about the database timezone.

twelch commented 11 years ago

Thanks, sounds like we should get dialed on our pattern for this as it will come up in every project

twelch commented 11 years ago

Is this updated on production? I'm still seeing the times as different. see screenshots

screen shot 2013-10-13 at 1 16 11 am screen shot 2013-10-13 at 1 16 03 am