Ecotrust / usvi

1 stars 4 forks source link

Time is off in the dashboard #42

Closed eknuth closed 11 years ago

eknuth commented 11 years ago

Issue by twelch from Friday Sep 27, 2013 at 06:01 GMT Originally opened as https://github.com/Ecotrust/solomon/issues/191


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

Comment by eknuth from Friday Oct 11, 2013 at 23:34 GMT


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.

eknuth commented 11 years ago

Comment by twelch from Saturday Oct 12, 2013 at 00:42 GMT


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

eknuth commented 11 years ago

Comment by twelch from Saturday Oct 12, 2013 at 08:18 GMT


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